blob: f48b1559cb7142feaff0254a84aa68eb896d6e3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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
|