project/main/settings.script
2025-08-25 01:59:20 +01:00

42 lines
1.2 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