53 lines
No EOL
1.6 KiB
Text
53 lines
No EOL
1.6 KiB
Text
|
||
ß
|
||
Àfunction init(self)
|
||
-- Add initialization code here
|
||
-- Learn more: https://defold.com/manuals/script/
|
||
-- Remove this function if not needed
|
||
local node = gui.get_node("enter")
|
||
gui.set_position(node, vmath.vector3(450,250,1))
|
||
gui.set_color(gui.get_node("enter"), vmath.vector4(0.4118, 0.2863, 0.0706, 1.0))
|
||
|
||
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 on_message(self, message_id, message, sender)
|
||
if message_id == hash("enterthename") then
|
||
gui.set_text(gui.get_node("enter"), message.enter)
|
||
gui.set_color(gui.get_node("name"), vmath.vector4(0, 1, 0, 1))
|
||
end
|
||
if message_id == hash("written_name") then
|
||
gui.set_text(gui.get_node("name"), message.name)
|
||
gui.set_color(gui.get_node("name"), vmath.vector4(1, 0, 0, 1))
|
||
end
|
||
end
|
||
|
||
function on_input(self, action_id, action)
|
||
-- Add input-handling code here. The game object this script is attached to
|
||
-- must have acquired input focus:
|
||
--
|
||
-- msg.post(".", "acquire_input_focus")
|
||
--
|
||
-- All mapped input bindings will be received. Mouse and touch input will
|
||
-- be received regardless of where on the screen it happened.
|
||
-- Learn more: https://defold.com/manuals/input/
|
||
-- Remove this function if not needed
|
||
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/entername.gui_script" |