Class: RGame::Engine::PlayerController
- Inherits:
-
Object
- Object
- RGame::Engine::PlayerController
- Defined in:
- lib/rgame/engine/input/player_controller.rb
Overview
Drives an Actor from player input: turns the move_x/move_y actions into a
movement intent. NPC controllers implement the same intent(dt, input) seam
and ignore input.
Instance Method Summary collapse
Instance Method Details
#intent(_dt, input) ⇒ Object
9 10 11 |
# File 'lib/rgame/engine/input/player_controller.rb', line 9 def intent(_dt, input) [input.axis(:move_x), input.axis(:move_y)] end |