Class: Chingu::Particle
- Inherits:
-
GameObject
- Object
- BasicGameObject
- GameObject
- Chingu::Particle
- Defined in:
- lib/chingu/particle.rb
Instance Attribute Summary
Attributes inherited from GameObject
#angle, #center, #center_x, #center_y, #color, #factor, #factor_x, #factor_y, #image, #mode, #x, #y, #zorder
Attributes inherited from BasicGameObject
#options, #parent, #paused, #visible
Instance Method Summary collapse
-
#initialize(options) ⇒ Particle
constructor
A new instance of Particle.
- #update ⇒ Object
Methods inherited from GameObject
#alpha, #alpha=, #distance_to, #draw, #inside_window?, #outside_window?
Methods included from Helpers::RotationCenter
#rotation_center, #rotation_center=
Methods included from Helpers::InputClient
Methods inherited from BasicGameObject
all, create, #destroy, destroy_all, destroy_if, #draw, #draw_trait, has_trait, has_traits, #hide!, initialize_trait, #pause!, #paused?, #setup_trait, #show!, size, #trait_options, #unpause!, #update_trait, #visible?
Methods included from Helpers::ClassInheritableAccessor
Constructor Details
#initialize(options) ⇒ Particle
Returns a new instance of Particle.
11 12 13 14 |
# File 'lib/chingu/particle.rb', line 11 def initialize() super({:mode => :additive}.merge()) @animation = [:animation] || nil end |
Instance Method Details
#update ⇒ Object
16 17 18 |
# File 'lib/chingu/particle.rb', line 16 def update self.image = @animation.next if @animation end |