- Game Development with Swift
- Stephen Haney
- 155字
- 2021-07-16 13:45:41
Chapter 3. Mix in the Physics
SpriteKit includes a fully functional physics engine. It is easy to implement and very useful; most mobile game designs require some level of physical interaction between game objects. In our game, we want to know when the player runs into the ground, an enemy, or a power-up. The physics system can track these collisions and execute our specific game code when any of these events occur. SpriteKit's physics engine can also apply gravity to the world, bounce and spin colliding sprites against each other, and create realistic movement through impulses – and it does all of this before every single frame is drawn to the screen.
The topics in this chapter include:
- Adopting a protocol for consistency
- Organizing game objects into classes
- Adding the player's character
- Renovating the
GameScene
class - Physics bodies and gravity
- Exploring physics simulation mechanics
- Movement with impulses and forces
- Bumping bees into bees
推薦閱讀
- MySQL高可用解決方案:從主從復制到InnoDB Cluster架構
- 計算機組成原理與接口技術:基于MIPS架構實驗教程(第2版)
- Hadoop與大數據挖掘(第2版)
- 數據庫開發實踐案例
- Oracle高性能自動化運維
- 軟件成本度量國家標準實施指南:理論、方法與實踐
- OracleDBA實戰攻略:運維管理、診斷優化、高可用與最佳實踐
- 數亦有道:Python數據科學指南
- SQL優化最佳實踐:構建高效率Oracle數據庫的方法與技巧
- 數據中心數字孿生應用實踐
- Proxmox VE超融合集群實踐真傳
- C# 7 and .NET Core 2.0 High Performance
- 數據庫原理及應用實驗:基于GaussDB的實現方法
- GameMaker Game Programming with GML
- 信息技術導論