Class: MG::Particle
Properties collapse
-
#angle ⇒ Float
The angle of each particle.
-
#angle_range ⇒ Float
The angle variation of each particle.
-
#duration ⇒ Float
The duration of the particle.
-
#end_color ⇒ Color
The color that should be used when the particle ends.
-
#life ⇒ Float
The life of each particle.
-
#life_range ⇒ Float
The life variation of each particle.
-
#particle_count ⇒ Integer
The number of particles to emit.
-
#position_range ⇒ Point
The position variation of each particle.
-
#speed ⇒ Float
The speed of the particle emitter.
-
#start_color ⇒ Color
The color that should be used when the particle starts.
-
#texture ⇒ String
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
-
#initialize(file_name = nil) ⇒ Particle
constructor
Creates a Particle object.
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.
838 |
# File 'doc/API_reference.rb', line 838 def initialize(file_name=nil); end |
Instance Attribute Details
#angle ⇒ Float
Returns the angle of each particle.
856 857 858 |
# File 'doc/API_reference.rb', line 856 def angle @angle end |
#angle_range ⇒ Float
Returns the angle variation of each particle.
859 860 861 |
# File 'doc/API_reference.rb', line 859 def angle_range @angle_range end |
#duration ⇒ Float
Returns the duration of the particle.
862 863 864 |
# File 'doc/API_reference.rb', line 862 def duration @duration end |
#end_color ⇒ Color
Returns 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 |
#life ⇒ Float
Returns the life of each particle.
850 851 852 |
# File 'doc/API_reference.rb', line 850 def life @life end |
#life_range ⇒ Float
Returns the life variation of each particle.
853 854 855 |
# File 'doc/API_reference.rb', line 853 def life_range @life_range end |
#particle_count ⇒ Integer
Returns the number of particles to emit.
868 869 870 |
# File 'doc/API_reference.rb', line 868 def particle_count @particle_count end |
#position_range ⇒ Point
Returns the position variation of each particle.
865 866 867 |
# File 'doc/API_reference.rb', line 865 def position_range @position_range end |
#speed ⇒ Float
Returns the speed of the particle emitter.
847 848 849 |
# File 'doc/API_reference.rb', line 847 def speed @speed end |
#start_color ⇒ Color
Returns 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.
844 845 846 |
# File 'doc/API_reference.rb', line 844 def texture=(value) @texture = value end |