Time for action – hitting the bird animation
Currently, when the hunter hits the bird, it just disappears from the screen. This does not look very realistic. I mean the hunter does not have some kind of disintegrator blaster or something like that, and the last time I checked the arrow does not work this way.
Let's fix this by adding falling and rotation animation:
Open the
Bird.m
file and add the following method right below theanimateFly
method:-(void)animateFall { CGPoint fallDownOffScreenPoint = ccp(self.position.x, -self.boundingBox.size.height); CCActionMoveTo *fallOffScreen = [CCActionMoveTo actionWithDuration:2.0f position:fallDownOffScreenPoint]; CCActionRemove *removeWhenDone = [CCActionRemove action]; CCActionSequence *fallSequence = [CCActionSequence actions: fallOffScreen, removeWhenDone, nil]; [self runAction:fallSequence]; ...