Getting Input from the User
摘要
All programs, such as word processors, spreadsheets, and databases, must accept input from the user. In video games, players commonly control a game object through the keyboard, mouse, joystick, or touch screen. By defining how specific keys on the keyboard function, how different buttons on a mouse or joystick work, and how to detect different types of touch gestures, you can detect user input for your game’s particular needs.