Greetings,
I just completed Mr Nom and it works just fine. There is however something weird. If I hold down either turn arrows Mr Nom goes CRAZY and starts spinning until he decides to stop.
I fixed it with the following code in the game screen:
if(event.type == TouchEvent.TOUCH_DOWN && !touchScreenPressed) {
touchScreenPressed = true;
if(event.x < 64 && event.y > 416) {
world.snake.turnLeft();
}
if(event.x > 256 && event.y > 416) {
world.snake.turnRight();
}
}
if(event.type == TouchEvent.TOUCH_UP && touchScreenPressed) {
if(event.x < 64 && event.y > 416) {
touchScreenPressed = false;
}
if(event.x > 256 && event.y > 416) {
touchScreenPressed = false;
}
}
I added some stuff as you can see. But of course I'm sure something I did made this happen but I have no idea what happened. Any thoughts?
