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

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
主站蜘蛛池模板: 吉水县| 城市| 滦平县| 梁山县| 东至县| 马公市| 江油市| 泉州市| 乐东| 张家口市| 六盘水市| 宝山区| 合山市| 富锦市| 铜鼓县| 莱阳市| 长宁县| 漳浦县| 邹平县| 西昌市| 志丹县| 鸡泽县| 新巴尔虎左旗| 株洲市| 达日县| 道真| 长乐市| 夏津县| 商河县| 石林| 牟定县| 绥滨县| 虹口区| 高雄市| 新竹市| 鄢陵县| 沂水县| 丰镇市| 贵德县| 寻乌县| 津南区|