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

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.

主站蜘蛛池模板: 德令哈市| 广州市| 建德市| 富裕县| 达拉特旗| 环江| 邻水| 东辽县| 延川县| 汝南县| 历史| 永善县| 西和县| 揭东县| 安宁市| 格尔木市| 林甸县| 武隆县| 巴马| 滨州市| 淅川县| 红安县| 芦山县| 轮台县| 汪清县| 临猗县| 乐业县| 琼海市| 台山市| 华安县| 博客| 志丹县| 兰西县| 峨山| 嘉黎县| 江津市| 石泉县| 小金县| 上思县| 葫芦岛市| 通州区|