- Android Game Programming by Example
- John Horton
- 212字
- 2021-07-16 13:50:02
Chapter 3. Tappy Defender – Taking Flight
We are now ready to quickly add a lot of new objects and some features as well. By the end of this chapter, we will be really close to a playable game. We will detect the player touching the screen, so he can control the spaceship. We will add virtual boosters to our SpaceShip
class to move the ship up and down and increase the speed.
We will then detect the resolution of the Android device and use it to do things like prevent the player boosting off the screen, and to detect when our enemies need to respawn.
We will create a new EnemyShip
class, which will represent the suicidal enemies. We will also see how we can easily spawn and then control them without changing any of the logic from the control part of our code.
We will add a scrolling effect by adding a SpaceDust
class and spawning dozens of them to make it look like the player is whizzing through space.
Finally, we will learn about, and implement, collision detection so we know when our player has been hit by an enemy, as well as look at a graphical trick to help us with debugging our collision detection code.
- 解構產品經理:互聯網產品策劃入門寶典
- GitLab Cookbook
- 騰訊iOS測試實踐
- Vue.js 3.x從入門到精通(視頻教學版)
- Data Analysis with IBM SPSS Statistics
- Learning JavaScript Data Structures and Algorithms
- Windows內核編程
- 微服務從小白到專家:Spring Cloud和Kubernetes實戰
- Kubernetes進階實戰
- 零基礎輕松學C++:青少年趣味編程(全彩版)
- PyQt編程快速上手
- 微信小程序開發邊做邊學(微課視頻版)
- Zend Framework 2 Cookbook
- Unity 3D UI Essentials
- C語言程序設計