Class: BeltsEngine::Tools::Input
- Inherits:
-
Object
- Object
- BeltsEngine::Tools::Input
- Defined in:
- lib/belts_engine/tools/input.rb,
lib/belts_engine/tools/input/mouse.rb,
lib/belts_engine/tools/input/keyboard.rb
Defined Under Namespace
Constant Summary
Constants included from Mouse
Constants included from Keyboard
Instance Method Summary collapse
-
#initialize ⇒ Input
constructor
A new instance of Input.
- #update(changes) ⇒ Object
Methods included from Mouse
#button?, #button_down?, #button_up?, #mouse, #update_buttons, #update_position
Methods included from Keyboard
#key?, #key_down?, #key_up?, #update_keys
Constructor Details
#initialize ⇒ Input
Returns a new instance of Input.
7 8 9 10 11 |
# File 'lib/belts_engine/tools/input.rb', line 7 def initialize reset_keyboard_state # reset_mouse_state #@current_keys[:mouse_x] = @current_keys[:mouse_y] = 0 end |
Instance Method Details
#update(changes) ⇒ Object
13 14 15 |
# File 'lib/belts_engine/tools/input.rb', line 13 def update(changes) update_keys(changes) end |