Class: MG::Particle

Inherits:
Node
  • Object
show all
Defined in:
doc/API_reference.rb

Constructors collapse

Attributes inherited from Node

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

Constructors collapse

Methods inherited from Node

#add, #children, #clear, #delete, #delete_from_parent, #intersects?, #number_of_running_actions, #parent, #run_action, #schedule, #schedule_once, #stop_action, #stop_all_actions, #unschedule, #visible=, #visible?

Constructor Details

#initialize(file_name = nil) ⇒ Particle

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.



892
# File 'doc/API_reference.rb', line 892

def initialize(file_name=nil); end

Instance Attribute Details

#angleFloat

Returns the angle of each particle.

Returns:

  • (Float)

    the angle of each particle.



907
908
909
# File 'doc/API_reference.rb', line 907

def angle
  @angle
end

#angle_rangeFloat

Returns the angle variation of each particle.

Returns:

  • (Float)

    the angle variation of each particle.



910
911
912
# File 'doc/API_reference.rb', line 910

def angle_range
  @angle_range
end

#durationFloat

Returns the duration of the particle.

Returns:

  • (Float)

    the duration of the particle.



913
914
915
# File 'doc/API_reference.rb', line 913

def duration
  @duration
end

#end_colorColor

Returns the color that should be used when the particle ends.

Returns:

  • (Color)

    the color that should be used when the particle ends.



925
926
927
# File 'doc/API_reference.rb', line 925

def end_color
  @end_color
end

#lifeFloat

Returns the life of each particle.

Returns:

  • (Float)

    the life of each particle.



901
902
903
# File 'doc/API_reference.rb', line 901

def life
  @life
end

#life_rangeFloat

Returns the life variation of each particle.

Returns:

  • (Float)

    the life variation of each particle.



904
905
906
# File 'doc/API_reference.rb', line 904

def life_range
  @life_range
end

#particle_countInteger

Returns the number of particles to emit.

Returns:

  • (Integer)

    the number of particles to emit.



919
920
921
# File 'doc/API_reference.rb', line 919

def particle_count
  @particle_count
end

#position_rangePoint

Returns the position variation of each particle.

Returns:

  • (Point)

    the position variation of each particle.



916
917
918
# File 'doc/API_reference.rb', line 916

def position_range
  @position_range
end

#speedFloat

Returns the speed of the particle emitter.

Returns:

  • (Float)

    the speed of the particle emitter.



898
899
900
# File 'doc/API_reference.rb', line 898

def speed
  @speed
end

#start_colorColor

Returns the color that should be used when the particle starts.

Returns:

  • (Color)

    the color that should be used when the particle starts.



922
923
924
# File 'doc/API_reference.rb', line 922

def start_color
  @start_color
end

#texture=(value) ⇒ String (writeonly)

Returns the path of the texture file.

Returns:

  • (String)

    the path of the texture file.



895
896
897
# File 'doc/API_reference.rb', line 895

def texture=(value)
  @texture = value
end