Game Development Reference
In-Depth Information
As you can see the code is fairly simple and involves techniques we have already
discussed. You can see the final result in scene8 in the accompanying project.
This concludes this chapter about reading user input. We have learned how to read
keyboard and mouse input and convert this input to meaningful actions that allow the
player to interact with the game environment. Unity allows us to read input from wide
range of input devices, such as game pads, joysticks, touch screens, steering wheels and
others. Even it is not possible to cover all of them in this chapter, the basic idea is similar:
you read the state of keys and buttons as well as the displacement of the fingers on a touch
screen and interpret them to some actions in the game.
Search WWH ::




Custom Search