Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --prehash the inputs
- local input_left = hash("left")
- local input_right = hash("right")
- local input_jump = hash("jump")
- function init(self)
- msg.post(".", "acquire_input_focus")
- end
- function on_input(self, action_id, action)
- if action_id == input_left then
- print("left")
- else if action_id == input_right then
- print("right")
- else if action_id == input_jump then
- print("jump")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement