Sha256: edcd2014d4ad1d0a34e11b6845f47b5e8cd5a8aa7e377855ee972cd6badd4dd3
Contents?: true
Size: 501 Bytes
Versions: 8
Compression:
Stored size: 501 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 && !@mapping.empty? 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
8 entries across 8 versions & 1 rubygems