Now that we have hit point bars on the screen, let's add some things that the user can actually interact with.
The first thing we are going to add is the ability to pause and resume the game at will. This is actually quite important, especially for mobile action games. If a call comes on the mobile device (iPhone) and we don't have a pause functionality, the player might get frustrated by not being able to pause the game and lose their progress or winning streak.
Before we get into implementing these buttons, let's download the necessary graphics for this chapter which are available at https://github.com/freezedev/pirategame-assets/releases/download/0.7/Graphics_07.zip. Copy the contents of the extracted file into the project.
Let's think of what we need to do when pausing the game: