Sha256: 9ee7d1f79251580f6d9607dac7bd3ba532201d7dfb7c1b5513bf688c34d0c0db
Contents?: true
Size: 431 Bytes
Versions: 3
Compression:
Stored size: 431 Bytes
Contents
module MoveByCursor def calculate_direction_by_cursors if Gosu.button_down?(Gosu::KB_DOWN) @direction = Coordinates.down elsif Gosu.button_down?(Gosu::KB_UP) @direction = Coordinates.up elsif Gosu.button_down?(Gosu::KB_RIGHT) @direction = Coordinates.right elsif Gosu.button_down?(Gosu::KB_LEFT) @direction = Coordinates.left else @direction = Coordinates.zero end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fantasy-0.1.7 | lib/fantasy/includes/move_by_cursors.rb |
fantasy-0.1.5.1 | lib/fantasy/includes/move_by_cursors.rb |
fantasy-0.1.5 | lib/fantasy/includes/move_by_cursors.rb |