Skip to Main Content
Learning iPhone Game Development with Cocos2D 3.0
book

Learning iPhone Game Development with Cocos2D 3.0

by Kirill Muzykov
June 2014
Beginner to intermediate content levelBeginner to intermediate
434 pages
9h 49m
English
Packt Publishing
Content preview from Learning iPhone Game Development with Cocos2D 3.0

Time for action – adding the player character

Now that we have added the background image, let's add our hunter character. There will be two images, as we're going to split our character in the following two halves:

  • Torso
  • Legs

This will allow us to rotate the torso (the upper body) when aiming. It will get clearer in a moment.

It is a good idea to group these two images into one Cocos2D node to have the ability to operate with both of them as a single game object. Also, we're going to add some code to implement the properties and behavior of our hunter character game object, so we'll need a class for it anyway.

To add the hunter to our game, we need to do the following:

  1. Create a new group for our game objects so that we can separate game object classes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit

Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit

James Goodwill, Wesley Matlock

Publisher Resources

ISBN: 9781782160144Supplemental Content