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

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
主站蜘蛛池模板: 锡林郭勒盟| 佛坪县| 龙口市| 丹棱县| 石泉县| 山丹县| 大厂| 深水埗区| 宜川县| 惠来县| 涟水县| 积石山| 湘阴县| 库车县| 岳西县| 吉林省| 民和| 沈丘县| 洛浦县| 华亭县| 墨玉县| 芷江| 济南市| 上饶县| 长垣县| 耒阳市| 大新县| 板桥市| 台中市| 万山特区| 敖汉旗| 尼木县| 宿州市| 溆浦县| 新乐市| 扶沟县| 甘南县| 宁海县| 桂阳县| 施秉县| 新沂市|