- Swift Game Development(Third Edition)
- Siddharth Shekar Stephen Haney
- 196字
- 2021-07-16 17:37:46
Chapter 4. Adding Controls
Players control mobile games through a very limited number of interactions. Often, games feature only a single mechanic: tap anywhere on the screen to jump or fly. Contrast that with a console controller with dozens of button combinations. With so few actions, keeping users engaged with polished, fun controls is vital to the success of your game.
In this chapter, you will learn how to implement several popular control schemes that have emerged from the App Store. First, we will experiment with tilt controls; the physical orientation of the device will determine where the player flies. Then, we will wire up the onTap
events on our sprite nodes. Finally, we will implement and polish a simple control scheme for flying in our game: tap anywhere on the screen to fly higher. You can combine these techniques to create unique and enjoyable controls in your future games.
The topics in this chapter include the following:
- Retrofitting the Player class for flight
- Polling for device movement with Core Motion
- Wiring up the sprite on Tap events
- Teaching our penguin to fly
- Improving the camera
- Looping the ground as the player moves forward
- 肖鷹文集初編·批評卷
- 公共文化館治理研究(2015年):四川省文化館“十三五”規(guī)劃重大課題調(diào)研成果集
- 書事:近現(xiàn)代版本雜談
- 中國城市遺址類博物館開發(fā)模式研究
- 醫(yī)學(xué)文獻(xiàn)管理
- 檔案保護(hù)技術(shù)
- 檔案庫房技術(shù)管理
- 醫(yī)藥信息處理與分析
- 現(xiàn)代圖書館全面質(zhì)量管理與創(chuàng)新服務(wù)研究
- 河南省博物院鎮(zhèn)館之寶
- 北京大學(xué)中國古文獻(xiàn)研究中心集刊·第十四輯
- 探索與實踐:博物館與口述歷史
- 圖書情報專業(yè)碩士培養(yǎng)研究與實踐
- 國學(xué)研究文萃·文學(xué)卷
- 高校圖書館休閑功能開發(fā)研究