Summary
We have done a lot of theory in this chapter. Everything from the mathematics of detecting collisions and learning how RecctF
has the intersects
method which can handle rectangle intersections for us. We also looked closely at SoundPool
including at how we can detect which version of Android the player has and vary our code accordingly. Initializing a SoundPool
object also brought us into contact with method chaining where we can call multiple methods on the same object in a single line of code. Finally, we used all this knowledge to complete the Pong game.
Perhaps the best thing is that now we have all this experience and theory behind us we will now (starting in the next chapter) be able to quickly complete the next game in just two chapters at the same time as learning about Java arrays that help us to handle lots of data.