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

Summary

We have learned how to deal with input from users in several ways and how to make it transparent for the GameEngine.

To get a proper visual feedback from the controller, we created a Player game object that updates its position based on the values from the InputController. We also learned how to add and remove game objects to and from the GameEngine while playing.

We created a very basic keypad that later evolved into a virtual joystick. We also learned how to handle external controllers.

At this point, our game has a spaceship that moves along the screen and fires bullets. It can be controlled using a virtual joystick or a gamepad, independently.

The current implementation does lag occasionally and we have barely started drawing objects on the screen. It is time to fix this. Next stop: improve the rendering by drawing directly on the view instead of relying on positioning views on the screen.

主站蜘蛛池模板: 罗甸县| 富裕县| 阿克| 巴青县| 西林县| 沅江市| 银川市| 灵寿县| 吉木萨尔县| 西贡区| 天等县| 镶黄旗| 新平| 阿坝县| 通化县| 宽城| 景泰县| 宣城市| 苍南县| 株洲市| 闸北区| 巩留县| 惠东县| 怀集县| 长汀县| 玉龙| 水城县| 义马市| 朝阳县| 潼关县| 肃宁县| 育儿| 吴堡县| 砚山县| 怀安县| 合江县| 堆龙德庆县| 富裕县| 黑河市| 五常市| 武定县|