I’ve been working through the Lime tutorials and am not sure that multitouch is working like I would expect.
As an example, I have tutorial 12 (Collectible Items) running on my phone so that I can try out the multi touch functionality (not possible on the simulator).
If I have the character moving with a movement arrow depressed and held, and then jump, the character jumps (multi-touch as one would hope) but then I have to repress the movement arrow to get any movement going after having executed the jump.
I would have expected the movement arrow to have continued registering having been “depressed” and having the character continue to move accordingly. Instead I have to repress the movement arrow after jumping.
Here’s the onButtonLeftEvent function:
local onButtonLeftEvent = function(event)
if event.phase == "press" then
player.direction = DIRECTION\_LEFT
player.xScale = player.direction
player.state = STATE\_WALKING
else
player.state = STATE\_IDLE
end
player:prepare("anim" .. player.state)
player:play()
end
I was thinking I needed a different event.phase type inorder to continue to “read” the event while the jump executes. Any thoughts?
It just doesn’t quite feel polished to have to release the movement arrow and then repress it after having executed a jump.
Thanks in advance for any insight on this [import]uid: 105707 topic_id: 24479 reply_id: 324479[/import]