Module: Lotu::Controllable::InstanceMethods

Defined in:
lib/lotu/behaviors/controllable.rb

Instance Method Summary collapse

Instance Method Details

#init_behaviorObject



9
10
11
12
# File 'lib/lotu/behaviors/controllable.rb', line 9

def init_behavior
  super
  @_input_controller = nil
end

#set_keys(keys) ⇒ Object

This will call #go_up every game loop Gosu::Button::KbUp => :go_up This is the same as the above Gosu::Button::KbUp => [:go_up, 0]

This will call #go_up once Gosu::Button::KbUp => [:go_up, false]

This will call #go_up every 50ms Gosu::Button::KbUp => [:go_up, 50]



23
24
25
# File 'lib/lotu/behaviors/controllable.rb', line 23

def set_keys(keys)
  @_input_controller = InputController.new(self, keys)
end