- 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
推薦閱讀
- 數據庫應用實戰
- Hands-On Data Structures and Algorithms with Rust
- ETL數據整合與處理(Kettle)
- Python絕技:運用Python成為頂級數據工程師
- UDK iOS Game Development Beginner's Guide
- 深入淺出MySQL:數據庫開發、優化與管理維護(第2版)
- Oracle高性能自動化運維
- 數據驅動設計:A/B測試提升用戶體驗
- Spark大數據編程實用教程
- 大數據技術入門
- 大數據分析:數據倉庫項目實戰
- 計算機組裝與維護(微課版)
- Mastering LOB Development for Silverlight 5:A Case Study in Action
- 基于數據發布的隱私保護模型研究
- 掌中寶:電腦綜合應用技巧