Class: MG::Particle

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

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, #run_action, #stop_action, #stop_all_actions

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.



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

def initialize(file_name=nil); end

Instance Attribute Details

#angleFloat

Returns the angle of each particle.

Returns:

  • (Float)

    the angle of each particle.



856
857
858
# File 'doc/API_reference.rb', line 856

def angle
  @angle
end

#angle_rangeFloat

Returns the angle variation of each particle.

Returns:

  • (Float)

    the angle variation of each particle.



859
860
861
# File 'doc/API_reference.rb', line 859

def angle_range
  @angle_range
end

#durationFloat

Returns the duration of the particle.

Returns:

  • (Float)

    the duration of the particle.



862
863
864
# File 'doc/API_reference.rb', line 862

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.



874
875
876
# File 'doc/API_reference.rb', line 874

def end_color
  @end_color
end

#lifeFloat

Returns the life of each particle.

Returns:

  • (Float)

    the life of each particle.



850
851
852
# File 'doc/API_reference.rb', line 850

def life
  @life
end

#life_rangeFloat

Returns the life variation of each particle.

Returns:

  • (Float)

    the life variation of each particle.



853
854
855
# File 'doc/API_reference.rb', line 853

def life_range
  @life_range
end

#particle_countInteger

Returns the number of particles to emit.

Returns:

  • (Integer)

    the number of particles to emit.



868
869
870
# File 'doc/API_reference.rb', line 868

def particle_count
  @particle_count
end

#position_rangePoint

Returns the position variation of each particle.

Returns:

  • (Point)

    the position variation of each particle.



865
866
867
# File 'doc/API_reference.rb', line 865

def position_range
  @position_range
end

#speedFloat

Returns the speed of the particle emitter.

Returns:

  • (Float)

    the speed of the particle emitter.



847
848
849
# File 'doc/API_reference.rb', line 847

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.



871
872
873
# File 'doc/API_reference.rb', line 871

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.



844
845
846
# File 'doc/API_reference.rb', line 844

def texture=(value)
  @texture = value
end