Sha256: 6cfded4b7f17bd26702b9ee343892c3b367a5c0371ef9707c1debbdd17dfbc35
Contents?: true
Size: 615 Bytes
Versions: 2
Compression:
Stored size: 615 Bytes
Contents
FelFlame::Components.new :PlayerControl, north: 'up', south: 'down', east: 'right', west: 'left', interact: 'space', menu: 'enter' =begin class Components # Gives control(keyboard or otherwise) over an object class PlayerControl < Helper::BaseComponent attr_accessor :north, :south, :east, :west, :interact, :menu def initialize @north = 'up' @south = 'down' @east = 'right' @west = 'left' @interact = 'space' @menu = 'enter' end def set(**opts) opts.each do |key, value| send "#{key}=", value end end end end =end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
felflame-1.0.1 | deprecated/components/03_player_control.rb |
felflame-1.0.0 | deprecated/components/03_player_control.rb |