How do I check if the touchStart event is the same as the touchEnded event

I'm trying to create a multitouch interface for multiple people to play a snake style game, I want them to be able to hold down the button, and then on release the snake would stop turning.

I've gotten so far as to make it turn when you tap the button, but I can't seem to get the touch Event right from the touchEnded function, because the event that gets passed through has already removed the touch from the touches[] array.

Any suggestions?

EDIT:

I managed to get it to work by comparing the 'which' in the touchStarted e to the touchEnded e.changedTouches[(whichfromtouchStarted)]

Sign In or Register to comment.