The downloadable AIA file SimpleBowling_example.aia has been updated to add missing images and to prevent the app from crashing when the game is played. It therefore differs from the code shown in video 4 as follows:
- add a bowling pin image to the TitleSprite on the home screen so that the sprite is visible
- set the Speed of the sprite in the TitleMove procedure (the Interval is set by default) to make it move
- add bowling pin images to the remaining PinSprites on the play screen
- set the Ball speed to a multiple of the Flung speed for more realistic movement
- add handling for a collision with the BallSprite to the PinCollide procedure, because a Ball sprite cannot be referenced with an Any ImageSprite block
- set the Speed and Heading of the ball and pin sprites to zero in the ResetPins procedure to stop them from moving and 'stand the pins up' ready to play again
No comments:
Post a Comment