Class: ParticleFX2D::Ruby2D::ShapeRendererFactory
- Inherits:
-
Object
- Object
- ParticleFX2D::Ruby2D::ShapeRendererFactory
- Includes:
- ParticleFX2D::RendererFactory
- Defined in:
- lib/particlefx2d/ruby2d/shape_renderer_factory.rb
Overview
Use an instance of this class to provide an Emitter with a renderer factory.
Instance Method Summary collapse
-
#initialize(renderer_class) ⇒ ShapeRendererFactory
constructor
Instantiate a shape renderer factory.
-
#renderer_for(particle) ⇒ Renderer
Return a particle renderer.
Methods included from ParticleFX2D::RendererFactory
#on_update_end, #on_update_start
Constructor Details
#initialize(renderer_class) ⇒ ShapeRendererFactory
Instantiate a shape renderer factory.
16 17 18 |
# File 'lib/particlefx2d/ruby2d/shape_renderer_factory.rb', line 16 def initialize(renderer_class) @renderer_class = renderer_class end |
Instance Method Details
#renderer_for(particle) ⇒ Renderer
Return a particle renderer.
23 24 25 |
# File 'lib/particlefx2d/ruby2d/shape_renderer_factory.rb', line 23 def renderer_for(particle) @renderer_class.for(particle) end |