-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript_2.script
33 lines (28 loc) · 1.18 KB
/
script_2.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function init(self)
msg.post('.', 'acquire_input_focus')
print(tostring(msg.url().socket) .. ' script_2 init')
msg.post('#', 'init_msg', {m = tostring(msg.url().socket) .. ' from script_2 init'})
end
function final(self)
print(tostring(msg.url().socket) .. ' script_2 final')
msg.post('printer#script', 'final_msg', {m = tostring(msg.url().socket) .. ' from script_2 final'})
end
function update(self, dt)
print(tostring(msg.url().socket) .. ' script_2 update')
msg.post('#', 'update_msg', {m = tostring(msg.url().socket) .. ' from script_2 update'})
end
function fixed_update(self, dt)
print(tostring(msg.url().socket) .. ' script_2 fixed_update')
msg.post('#', 'fixed_update_msg', {m = tostring(msg.url().socket) .. ' from script_2 fixed_update'})
end
function on_message(self, message_id, message, sender)
print(tostring(msg.url().socket) .. ' script_2 on_message: ' .. message.m)
if message_id == hash('fixed_update_msg') then
if self.second then go.delete() end
self.second = true
end
end
function on_input(self, action_id, action)
print(tostring(msg.url().socket) .. ' script_2 on_input')
msg.post('#', 'input_msg', {m = tostring(msg.url().socket) .. ' from script_2 on_input'})
end