Sha256: 75a10b64f43d306c851fd2352bce97c266e8ebcfde273f3e1a1572d75b149d62
Contents?: true
Size: 505 Bytes
Versions: 7
Compression:
Stored size: 505 Bytes
Contents
class AuthorEngine class Part module GosuInput BUTTONS = { "left" => Gosu::KbLeft, "right" => Gosu::KbRight, "up" => Gosu::KbUp, "down" => Gosu::KbDown, "x" => Gosu::KbX, "y" => Gosu::KbC, } def button?(name) down = false if BUTTONS.dig(name) down = Gosu.button_down?(BUTTONS.dig(name)) else raise "Button '#{name}' not found!" end return down end end end end
Version data entries
7 entries across 7 versions & 1 rubygems