Class: MG::Particle
Properties (collapse)
-
- (Float) angle
The angle of each particle.
-
- (Float) angle_range
The angle variation of each particle.
-
- (Float) duration
The duration of the particle.
-
- (Color) end_color
The color that should be used when the particle ends.
-
- (Float) life
The life of each particle.
-
- (Float) life_range
The life variation of each particle.
-
- (Integer) particle_count
The number of particles to emit.
-
- (Point) position_range
The position variation of each particle.
-
- (Float) speed
The speed of the particle emitter.
-
- (Color) start_color
The color that should be used when the particle starts.
-
- (String) texture
writeonly
The path of the texture file.
Attributes inherited from Node
#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #visible?, #z_index
Constructors (collapse)
-
- (Particle) initialize(file_name = nil)
constructor
Creates a Particle object.
Methods inherited from Node
#add, #children, #clear, #delete, #delete_from_parent, #intersects?, #parent
Constructor Details
- (Particle) initialize(file_name = nil)
Creates a Particle object. If file_name
is given, it should be
the name files can be created manually or with a visual editor such as
Particle Designer. If file_name
is not given an empty
Particle object will be created.
392 |
# File 'motion-game', line 392 def initialize(file_name=nil); end |
Instance Attribute Details
- (Float) angle
Returns the angle of each particle.
410 411 412 |
# File 'motion-game', line 410 def angle @angle end |
- (Float) angle_range
Returns the angle variation of each particle.
413 414 415 |
# File 'motion-game', line 413 def angle_range @angle_range end |
- (Float) duration
Returns the duration of the particle.
416 417 418 |
# File 'motion-game', line 416 def duration @duration end |
- (Color) end_color
Returns the color that should be used when the particle ends.
428 429 430 |
# File 'motion-game', line 428 def end_color @end_color end |
- (Float) life
Returns the life of each particle.
404 405 406 |
# File 'motion-game', line 404 def life @life end |
- (Float) life_range
Returns the life variation of each particle.
407 408 409 |
# File 'motion-game', line 407 def life_range @life_range end |
- (Integer) particle_count
Returns the number of particles to emit.
422 423 424 |
# File 'motion-game', line 422 def particle_count @particle_count end |
- (Point) position_range
Returns the position variation of each particle.
419 420 421 |
# File 'motion-game', line 419 def position_range @position_range end |
- (Float) speed
Returns the speed of the particle emitter.
401 402 403 |
# File 'motion-game', line 401 def speed @speed end |
- (Color) start_color
Returns the color that should be used when the particle starts.
425 426 427 |
# File 'motion-game', line 425 def start_color @start_color end |
- (String) texture=(value) (writeonly)
Returns the path of the texture file.
398 399 400 |
# File 'motion-game', line 398 def texture=(value) @texture = value end |