O'Reilly logo

Learning iPhone Game Development with Cocos2D 3.0 by Kirill Muzykov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – limiting the aiming range

Currently, we can just tap on the bird and the hunter will hit it. This is not very competitive; it would be harder to hit the bird if we needed to touch the screen closer to the hunter. We're going to limit the distance from the hunter where you can tap to aim.

At the end of the previous chapter, we added a bunch of images that we're going to use. There is one special image called power_meter.png, which we will use to show the aiming range.

Time for action – limiting the aiming range

Note

The power_meter.png image represents an arrow colored in white. Don't worry if you can't see it in the finder thumbnails or in preview, as you just can't see white ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required