- 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數據庫進階實戰
- 數據庫技術與應用教程(Access)
- Access 2007數據庫應用上機指導與練習
- 醫療大數據挖掘與可視化
- 智能數據時代:企業大數據戰略與實戰
- INSTANT Android Fragmentation Management How-to
- Hadoop 3實戰指南
- Oracle高性能SQL引擎剖析:SQL優化與調優機制詳解
- 計算機視覺
- Visual Studio 2012 and .NET 4.5 Expert Development Cookbook
- 算力芯片:高性能CPU/GPU/NPU微架構分析
- 數據庫高效優化:架構、規范與SQL技巧
- AutoCAD基礎與應用精品教程(2008版)
- 構建最高可用Oracle數據庫系統:Oracle 11gR2RAC管理、維護與性能優化
- 21天學通Oracle(第2版)