官术网_书友最值得收藏!

Chapter 2. Displaying the Hero and Controls

In the previous chapter, we saw the inside workings of Cocos2d-x, where we saw which projects and libraries were included. We also looked at the project and folder structure of a single project and dug deeper into understanding the classes that act as the basic building blocks for creating any game.

From this chapter, we will look at how to take those building blocks and make a functional game out of it.

In this chapter, we will see how to display objects, such as the background image and player, and position them on the screen. Once the player is on the screen, the next thing we will do is make her move around. We will look at different ways that the hero can be controlled in.

The things you will learn in this chapter are the following:

  • How to display the background image
  • How to display the hero
  • How to move the hero using the following:
    • Actions
    • Accelerometer
    • Touches
    • Custom controls
主站蜘蛛池模板: 江口县| 霍城县| 定襄县| 肇州县| 中西区| 鲁山县| 庆阳市| 松江区| 大新县| 横山县| 昌黎县| 龙岩市| 华宁县| 吕梁市| 乡城县| 岚皋县| 曲周县| 平原县| 汝城县| 佛冈县| 河池市| 濮阳市| 河池市| 六安市| 集安市| 旅游| 武山县| 元氏县| 永寿县| 连州市| 平陆县| 南郑县| 乌恰县| 英山县| 高雄市| 平阴县| 屯门区| 六安市| 息烽县| 津南区| 大悟县|