Final Touches
Before we wrap this chapter up, let's make a few final touches.
It's annoying that the pipes start right away once we load the game. This doesn't make much sense in our Title
game state either.
Let's make a few changes to the pipe manager to address this:
We've:
- Defauled to a stopped state to start
- Set
stopped
totrue
inreset()
as well - Added a
start()
method to start the pipe manager
Now update the click handler to make use of start()
:
That feels a little better. You can start the action when you choose to play.