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

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.

主站蜘蛛池模板: 陇川县| 兴宁市| 溆浦县| 抚远县| 青川县| 交口县| 桂阳县| 尉犁县| 芮城县| 桐城市| 辽源市| 东辽县| 黄平县| 修武县| 买车| 阜新| 保康县| 岱山县| 丹凤县| 苗栗市| 黄石市| 吴旗县| 渝中区| 古浪县| 若尔盖县| 林周县| 龙陵县| 邹平县| 衡水市| 二连浩特市| 岑巩县| 平利县| 肃宁县| 黎城县| 彝良县| 永和县| 南岸区| 大洼县| 阿巴嘎旗| 志丹县| 平顶山市|