Summary

So, that concludes the chapter on adding images to the screen and looking at different movement controls. We covered four different ways to control the character in this chapter. We saw how to control the character using the update function by moving them from left to right, and we saw how to move with touch as well as the accelerometer. We also created our own custom controls using buttons. In the next chapter, we will take a look at creating our own custom classes for bullets and the enemy. We will create the AI behavior for the enemy and refine the shooting and movement control mechanisms for the player.

We can still play around with what we learned in this chapter. Let's try doing the following:

  • In the update function, make the character ...

Get Learning Cocos2d-x Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.