Class: AGL::Block
- Inherits:
-
Object
- Object
- AGL::Block
- Defined in:
- lib/minigl/movement.rb
Instance Attribute Summary collapse
-
#h ⇒ Object
readonly
Returns the value of attribute h.
-
#passable ⇒ Object
readonly
Returns the value of attribute passable.
-
#w ⇒ Object
readonly
Returns the value of attribute w.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
- #bounds ⇒ Object
-
#initialize(x, y, w, h, passable) ⇒ Block
constructor
A new instance of Block.
Constructor Details
#initialize(x, y, w, h, passable) ⇒ Block
Returns a new instance of Block.
7 8 9 10 |
# File 'lib/minigl/movement.rb', line 7 def initialize x, y, w, h, passable @x = x; @y = y; @w = w; @h = h @passable = passable end |
Instance Attribute Details
#h ⇒ Object (readonly)
Returns the value of attribute h.
5 6 7 |
# File 'lib/minigl/movement.rb', line 5 def h @h end |
#passable ⇒ Object (readonly)
Returns the value of attribute passable.
5 6 7 |
# File 'lib/minigl/movement.rb', line 5 def passable @passable end |
#w ⇒ Object (readonly)
Returns the value of attribute w.
5 6 7 |
# File 'lib/minigl/movement.rb', line 5 def w @w end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
5 6 7 |
# File 'lib/minigl/movement.rb', line 5 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
5 6 7 |
# File 'lib/minigl/movement.rb', line 5 def y @y end |