Class: MG::Particle

Inherits:
Node
  • Object
show all
Defined in:
motion-game

Properties (collapse)

Attributes inherited from Node

#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #visible?, #z_index

Constructors (collapse)

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.

Parameters:

  • file_name (String) (defaults to: nil)

    the name of the property list particle file.



392
# File 'motion-game', line 392

def initialize(file_name=nil); end

Instance Attribute Details

- (Float) angle

Returns the angle of each particle.

Returns:

  • (Float)

    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.

Returns:

  • (Float)

    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.

Returns:

  • (Float)

    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.

Returns:

  • (Color)

    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.

Returns:

  • (Float)

    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.

Returns:

  • (Float)

    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.

Returns:

  • (Integer)

    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.

Returns:

  • (Point)

    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.

Returns:

  • (Float)

    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.

Returns:

  • (Color)

    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.

Returns:

  • (String)

    the path of the texture file.



398
399
400
# File 'motion-game', line 398

def texture=(value)
  @texture = value
end