Method: Core::Game::MapObject#direction
- Defined in:
- lib/game/map/map_object.rb
#direction ⇒ Object
180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/game/map/map_object.rb', line 180 def direction if Core.between?(@index, -1, 4) return 0 # down elsif Core.between?(@index, 3, 8) return 1 # left elsif Core.between?(@index, 7, 12) return 2 # right elsif Core.between?(@index, 11, 16) return 3 # up end end |