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 hunter

It is time to add the hunter back to the game. However, this time the birds will have fun. So, instead of shooting the birds, the hunter will be running around and dodging the stones that they throw at him.

There will be quite a lot of code to add, so here is a brief explanation of what we want to do. We want to create a new class for our hunter, as we cannot reuse the old Hunter class. Our new hunter class, PhysicsHunter, will have two animations: idle and running. We will control the hunter by touching the screen. When we touch the screen on the left-hand side, the hunter will run to the left, and when we touch the right-hand side of the screen, the hunter will run to the right. When we don't touch the screen, ...

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