Sha256: f6a25a076bb0b0dd23c68576d62b7a24b3eec17a86ddfeafde47cfebd9c52b5c
Contents?: true
Size: 490 Bytes
Versions: 13
Compression:
Stored size: 490 Bytes
Contents
# # class Control # # def initialize window, controllable, mapping = nil @window = window @controllable = controllable @mapping = mapping || controllable.respond_to?(:controls_mapping) && controllable.controls_mapping end # # def mapping? @mapping.present? end # # def handle return if @controllable.destroyed? @mapping.each do |key, send_params| @controllable.send(*send_params) if @window.button_down? key end end end
Version data entries
13 entries across 13 versions & 1 rubygems