Module: Hate::Input::Keyboard

Defined in:
lib/hate/input.rb

Class Method Summary collapse

Class Method Details

.pressed(k) ⇒ Object



7
8
9
10
# File 'lib/hate/input.rb', line 7

def self.pressed(k)
  @key_states[k] = true
  Hate::Core::Callbacks.keypressed(k)
end

.released(k) ⇒ Object



12
13
14
15
# File 'lib/hate/input.rb', line 12

def self.released(k)
  @key_states[k] = false
  Hate::Core::Callbacks.keyreleased(k)
end