Class: BoxGraphics
- Defined in:
- lib/entities/components/box_graphics.rb
Instance Attribute Summary
Attributes inherited from Component
Instance Method Summary collapse
- #draw(viewport) ⇒ Object
- #height ⇒ Object
-
#initialize(object) ⇒ BoxGraphics
constructor
A new instance of BoxGraphics.
- #width ⇒ Object
Methods inherited from Component
Constructor Details
#initialize(object) ⇒ BoxGraphics
Returns a new instance of BoxGraphics.
2 3 4 5 |
# File 'lib/entities/components/box_graphics.rb', line 2 def initialize(object) super(object) load_sprite end |
Instance Method Details
#draw(viewport) ⇒ Object
7 8 9 10 |
# File 'lib/entities/components/box_graphics.rb', line 7 def draw() @box.draw_rot(x, y, 0, object.angle) Utils.mark_corners(object.box) if $debug end |
#height ⇒ Object
12 13 14 |
# File 'lib/entities/components/box_graphics.rb', line 12 def height @box.height end |
#width ⇒ Object
16 17 18 |
# File 'lib/entities/components/box_graphics.rb', line 16 def width @box.width end |