Class: RubyArena::BulletRenderer
- Inherits:
-
Object
- Object
- RubyArena::BulletRenderer
- Defined in:
- lib/ruby_arena/bullet_renderer.rb
Instance Attribute Summary collapse
-
#bullet ⇒ Object
readonly
Returns the value of attribute bullet.
-
#window ⇒ Object
readonly
Returns the value of attribute window.
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(args) ⇒ BulletRenderer
constructor
A new instance of BulletRenderer.
Constructor Details
#initialize(args) ⇒ BulletRenderer
Returns a new instance of BulletRenderer.
5 6 7 8 |
# File 'lib/ruby_arena/bullet_renderer.rb', line 5 def initialize(args) @bullet = args.fetch(:bullet) @window = args.fetch(:window) end |
Instance Attribute Details
#bullet ⇒ Object (readonly)
Returns the value of attribute bullet.
3 4 5 |
# File 'lib/ruby_arena/bullet_renderer.rb', line 3 def bullet @bullet end |
#window ⇒ Object (readonly)
Returns the value of attribute window.
3 4 5 |
# File 'lib/ruby_arena/bullet_renderer.rb', line 3 def window @window end |
Instance Method Details
#draw ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/ruby_arena/bullet_renderer.rb', line 10 def draw window.draw_quad( x1, y1, color, x1, y2, color, x2, y2, color, x2, y1, color ) end |