46 lines
No EOL
1.3 KiB
Text
46 lines
No EOL
1.3 KiB
Text
|
||
‡
|
||
|
||
é function init(self)
|
||
msg.post(".", "acquire_input_focus")
|
||
end
|
||
|
||
function final(self)
|
||
-- Add finalization code here
|
||
-- Learn more: https://defold.com/manuals/script/
|
||
-- Remove this function if not needed
|
||
end
|
||
|
||
function update(self, dt)
|
||
-- Add update code here
|
||
-- Learn more: https://defold.com/manuals/script/
|
||
-- Remove this function if not needed
|
||
end
|
||
|
||
function fixed_update(self, dt)
|
||
-- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project
|
||
-- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in
|
||
-- Physics section of game.project
|
||
-- Add update code here
|
||
-- Learn more: https://defold.com/manuals/script/
|
||
-- Remove this function if not needed
|
||
end
|
||
|
||
function on_message(self, message_id, message, sender)
|
||
-- Add message-handling code here
|
||
-- Learn more: https://defold.com/manuals/message-passing/
|
||
-- Remove this function if not needed
|
||
end
|
||
|
||
function on_input(self, action_id, action)
|
||
if action_id == hash("escape") and action.pressed then
|
||
msg.post("main:/controller#main", "escape")
|
||
end
|
||
end
|
||
|
||
function on_reload(self)
|
||
-- Add reload-handling code here
|
||
-- Learn more: https://defold.com/manuals/hot-reload/
|
||
-- Remove this function if not needed
|
||
end
|
||
@main/instructions.script" |