For the actor Coin we copied the actor Platform because this two actors has similar characteristics and this save time. I created a collide rule for the coin with the actor sonic the they collide the special sound is playing I inserted in this rule the destroy behaviour to destroy is after when sonic collided with coin. After we I did a rule to check the score, I did it using the rule which says when the coin overlaps or collapse with actor of type Sonic it change the attribute Score +1 and I did another rule with says if the game score is =10 change the scene to you win.
For the sonic actor I added an animate picture.And the speed of this animate is 30fps. Also I used a constrain attribute-and the attribute that i constrained is the sonic x position to 150 pixel.This attribute helps the sonic to move to the left with 150 pixels and it helps to make the character more real. Also in the sonic game I created the gravity.Also the sonic is colliding with the platform and the coin.Also I used a timer for the sonic.I created a controller for the sonic where,I setted a timer for 4 sec. that means that sonic will appear after 4 sec in the game.If we do not set a timer the sonic appear in the game and then is falling down because of the gravity and it can not collide with the platform and the coin.Also I made my sonic actor jump and in the same time play a sound.A sound is also played when the sonic is colliding with the coin and with the platform.For the coin I created a new attribute that counts how many coins a collecting and also when the sonic collides with the coin ,the coin is destroyed.
No comments:
Post a Comment