O'Reilly logo

iOS Game Programming with Xcode and Cocos2d by Justin Dike

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

Chapter 4

Create Your Own Class

 

 

 

Are you ready to learn about animation, touches, particles, and all sorts of other awesome topics? Great. That's next chapter. Or maybe the one after that.

This chapter we are going to learn about creating your own classes. I know. I can hear some of you groaning, but a good class is like breathing air. You won't realize how much you need it until you're underwater. Or worse, trapped in a sinking car thinking, “I remember seeing an oxygen tank labeled Chapter 4!”

image

Section 1

Put On Your Classes Glasses

We've talked plenty in this book about using classes already. CCSprite is a class, for example. It ...

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