mirror of
https://github.com/defold/extension-websocket.git
synced 2025-09-27 16:02:18 +02:00
Initial commit
This commit is contained in:
37
example/example.collection
Executable file
37
example/example.collection
Executable file
@@ -0,0 +1,37 @@
|
||||
name: "main"
|
||||
scale_along_z: 0
|
||||
embedded_instances {
|
||||
id: "go"
|
||||
data: "components {\n"
|
||||
" id: \"example\"\n"
|
||||
" component: \"/example/example.script\"\n"
|
||||
" position {\n"
|
||||
" x: 0.0\n"
|
||||
" y: 0.0\n"
|
||||
" z: 0.0\n"
|
||||
" }\n"
|
||||
" rotation {\n"
|
||||
" x: 0.0\n"
|
||||
" y: 0.0\n"
|
||||
" z: 0.0\n"
|
||||
" w: 1.0\n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
""
|
||||
position {
|
||||
x: 0.0
|
||||
y: 0.0
|
||||
z: 0.0
|
||||
}
|
||||
rotation {
|
||||
x: 0.0
|
||||
y: 0.0
|
||||
z: 0.0
|
||||
w: 1.0
|
||||
}
|
||||
scale3 {
|
||||
x: 1.0
|
||||
y: 1.0
|
||||
z: 1.0
|
||||
}
|
||||
}
|
30
example/example.script
Normal file
30
example/example.script
Normal file
@@ -0,0 +1,30 @@
|
||||
function init(self)
|
||||
local s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
local reverse_s = myextension.reverse(s)
|
||||
print(reverse_s) --> ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba
|
||||
end
|
||||
|
||||
function final(self)
|
||||
-- Add finalization code here
|
||||
-- Remove this function if not needed
|
||||
end
|
||||
|
||||
function update(self, dt)
|
||||
-- Add update code here
|
||||
-- Remove this function if not needed
|
||||
end
|
||||
|
||||
function on_message(self, message_id, message, sender)
|
||||
-- Add message-handling code here
|
||||
-- Remove this function if not needed
|
||||
end
|
||||
|
||||
function on_input(self, action_id, action)
|
||||
-- Add input-handling code here
|
||||
-- Remove this function if not needed
|
||||
end
|
||||
|
||||
function on_reload(self)
|
||||
-- Add reload-handling code here
|
||||
-- Remove this function if not needed
|
||||
end
|
Reference in New Issue
Block a user