Tuesday, 30 October 2012

Keeping score


This algorithm take the score up by 1 everytime the shark eats a fish.
This script is set for the shark so only the shark will move.

The algorithm starts as the green flag is clicked, it sets the score to '0'.
The next part continues on forever as it is shown inside the forever bracked. the shark will continue moving unil the player desiced to stop the game. it won't just move in a straight line it will turn every now and then  as it moves,and IF the shark touches the fish (sprite 3) the score will go up by 1 and there will be a sound played to accompany it, this also let the player know that the score has indeed changed, then the shark will contine to moving.

This is a repetion algorithm, it repaets this sequence till the gammer chosses to end.


No comments:

Post a Comment