Sha256: 92bdff16c59def88c50c6cd951febb9d8ce6cedda8069ab9fa214a33a89900ea

Contents?: true

Size: 514 Bytes

Versions: 6

Compression:

Stored size: 514 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[InputManagerSystem].set_keys(self, keys)
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lotu-0.1.22 lib/lotu/behaviors/controllable.rb
lotu-0.1.21 lib/lotu/behaviors/controllable.rb
lotu-0.1.20 lib/lotu/behaviors/controllable.rb
lotu-0.1.19 lib/lotu/behaviors/controllable.rb
lotu-0.1.18 lib/lotu/behaviors/controllable.rb
lotu-0.1.16 lib/lotu/behaviors/controllable.rb