Class: MG::Particle
Constructors 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, #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?, #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.
892 |
# File 'doc/API_reference.rb', line 892 def initialize(file_name=nil); end |
Instance Attribute Details
#angle ⇒ Float
Returns the angle of each particle.
907 908 909 |
# File 'doc/API_reference.rb', line 907 def angle @angle end |
#angle_range ⇒ Float
Returns the angle variation of each particle.
910 911 912 |
# File 'doc/API_reference.rb', line 910 def angle_range @angle_range end |
#duration ⇒ Float
Returns the duration of the particle.
913 914 915 |
# File 'doc/API_reference.rb', line 913 def duration @duration end |
#end_color ⇒ Color
Returns 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 |
#life ⇒ Float
Returns the life of each particle.
901 902 903 |
# File 'doc/API_reference.rb', line 901 def life @life end |
#life_range ⇒ Float
Returns the life variation of each particle.
904 905 906 |
# File 'doc/API_reference.rb', line 904 def life_range @life_range end |
#particle_count ⇒ Integer
Returns the number of particles to emit.
919 920 921 |
# File 'doc/API_reference.rb', line 919 def particle_count @particle_count end |
#position_range ⇒ Point
Returns the position variation of each particle.
916 917 918 |
# File 'doc/API_reference.rb', line 916 def position_range @position_range end |
#speed ⇒ Float
Returns the speed of the particle emitter.
898 899 900 |
# File 'doc/API_reference.rb', line 898 def speed @speed end |
#start_color ⇒ Color
Returns 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.
895 896 897 |
# File 'doc/API_reference.rb', line 895 def texture=(value) @texture = value end |