官术网_书友最值得收藏!

Chapter 1. Interactive Input

Before we start creating our game, it is a good idea to figure out our controls. We'll create a script that will hold our inputs, and create control profiles for both the keyboard/mouse as well as the Xbox 360 Controller. Then, we'll add functionalities to be able to switch between the profiles and customize them as well. Control configurations like these are a key element to games, especially PC games.

In this chapter, we will cover the following topics:

  • Creating controls for the Xbox 360 Controller
  • Creating controls for a keyboard
  • Writing a function to detect whether our controller device is plugged in
  • Customizing our controls
  • Letting players switch controls
  • Switching controls with Graphical User Interface (GUI) buttons
  • Resetting controls back to factory settings
主站蜘蛛池模板: 任丘市| 远安县| 栾川县| 新密市| 辉县市| 平定县| 剑河县| 和硕县| 红安县| 峨山| 文水县| 新源县| 三亚市| 琼结县| 永清县| 株洲县| 怀远县| 德清县| 白银市| 乐山市| 宜春市| 多伦县| 万山特区| 民丰县| 潜山县| 泾阳县| 宣恩县| 肥城市| 辽中县| 平凉市| 多伦县| 兴业县| 永丰县| 朝阳市| 平利县| 惠东县| 车险| 普定县| 凉山| 克拉玛依市| 宁强县|