This event handler is for whenever the sprite is tapped. The sprite is called to move. The device vibrates for one second. When the sprite is tapped, it adds one to the score. If it is the second level the sprite is set to "pres2", otherwise the sprite is set to "pres1". If it is level three, the sprite is set to "pres1", otherwise it is set to "pres2". If it is level one then it will alternate between the two sprites. The score is set to "Score = [highscore]". If the score is higher than the high score, than the score is set to the high score. Lastly, when the sprite is tapped, one is added to the variable "SpriteHit".
|
This event handler is for when the screen initializes. If the start button is visible then the timer and score are set to zero. The score label is set. The canvas is set to the first level's background. The sprite is placed in the top left corner. A TinyDB is called to get the highscore. The level 2 and 3 label visibility is set to false.
|
androidmashstarter.apk | |
File Size: | 2383 kb |
File Type: | apk |
androidmashstarter.aia | |
File Size: | 847 kb |
File Type: | aia |