We're going to give our hunter several tries to hit the bird. This means that the bird will fly on the screen, then fly away, and then return. This sequence will repeat several times. This means we won't be able to use the
flipX property to understand whether our bird is flying away completely or just making another pass.
Instead of using the
flipX property as a flag, we're going to introduce a state's
enum and change the bird's state during the bird's life cycle. Then, when we'll apply some action to the bird. We're going to check whether the bird is in the correct state for this action. Perform the following steps:
Bird.hfile and make the following changes to add the new