Finishing the Tut’s Tomb Game
In this chapter, you will finish the Tut’s Tomb game. As a first step, you will add a score indicator to the game, using a custom game font. Second, you will add a nice visual effect by showing glitter on the treasures in the game. Finally, you will add sound and music. Take a look at the TutsTombFinal game example. This contains all the code explained in this chapter.
Adding a Score
In Tut’s Tomb, every time two treasures of the same type collide, they disappear from the screen and the player gets points. You need to display those points somewhere on the screen. In this game, the score is shown in the top left part of the screen. In the GameWorld class, you add a scoreObj property that will represent ...