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

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.

主站蜘蛛池模板: 虞城县| 庆云县| 温宿县| 海宁市| 舞阳县| 东至县| 博爱县| 江山市| 淮安市| 和顺县| 安康市| 望城县| 遂昌县| 石泉县| 四平市| 尼勒克县| 玛沁县| 遵义市| 亳州市| 绿春县| 嘉定区| 叶城县| 六盘水市| 肥东县| 曲松县| 文成县| 布拖县| 枣强县| 浦城县| 新晃| 肇东市| 赫章县| 吴桥县| 高青县| 宜都市| 巨野县| 思南县| 澄迈县| 措美县| 九台市| 阳泉市|