Module: Tileable::InstanceMethods
- Defined in:
- lib/tileable.rb
Instance Method Summary collapse
Instance Method Details
#at?(x, y) ⇒ Boolean
12 13 14 |
# File 'lib/tileable.rb', line 12 def at?(x,y) center == Processor.center_for(x, y) end |
#center ⇒ Object
16 17 18 |
# File 'lib/tileable.rb', line 16 def center [@center_x, @center_y] end |
#register!(x, y) ⇒ Object
7 8 9 10 |
# File 'lib/tileable.rb', line 7 def register!(x,y) @center_x, @center_y = *Processor.center_for(x, y) @top = [@center_x - 24, @center_y - 24] end |
#top_x ⇒ Object
20 21 22 |
# File 'lib/tileable.rb', line 20 def top_x @top.first end |
#top_y ⇒ Object
24 25 26 |
# File 'lib/tileable.rb', line 24 def top_y @top.last end |