Sha256: bf47e4e47f471ed9af2a1c307407a39e05e6e676e0795f910a63e3f9c1f60d33

Contents?: true

Size: 507 Bytes

Versions: 6

Compression:

Stored size: 507 Bytes

Contents

# Convenience module to set up an InputController
module Lotu
  module Controllable

    # 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]
    def set_keys(keys)
      @parent.systems[InputSystem].set_keys(self, keys)
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lotu-0.1.15 lib/lotu/behaviors/controllable.rb
lotu-0.1.14 lib/lotu/behaviors/controllable.rb
lotu-0.1.13 lib/lotu/behaviors/controllable.rb
lotu-0.1.12 lib/lotu/behaviors/controllable.rb
lotu-0.1.11 lib/lotu/behaviors/controllable.rb
lotu-0.1.10 lib/lotu/behaviors/controllable.rb