Saturday 14 March 2009

Game design #5

I created a really simplistic version of the game with tweens to work out the AS3 that I would need, it was a simple key function to make Dora move to collect the food and then an if statement to see if the food had hit Dora or not. However it came apparent that when Dora was still the IF statement was not occurring. To stop this from happening I added a timer to check if there had been a hit every 10 seconds so it wouldn’t just apply when the Dora was in movement but static as well.

After completing this simple version I added a variable for the score and included it within the IF statements for the food so if the correct food was hit then 10 points were added and if an incorrect food was hit the player looses 5 points from there current score.

No comments: