m |
|||
Line 102: | Line 102: | ||
− | {{ScriptFunction| | + | {{ScriptFunction|SParticle[]|GetTriggerParticles|(SParticleSystemTriggerEventType type)|Get the particles that met the condition in the particle trigger module. |
his method is typically called from MonoBehaviour.OnParticleTrigger in response to a trigger callback. | his method is typically called from MonoBehaviour.OnParticleTrigger in response to a trigger callback. | ||
− | type | + | type - Type of trigger to return particles for. |5=<pre></pre>}} |
− | {{ScriptFunction| | + | {{ScriptFunction|void|SetTriggerParticles|(SParticleSystemTriggerEventType type, SParticle[] sp)|Write modified particles back to the Particle System, during a call to OnParticleTrigger. |
− | type | + | type - Type of trigger to return particles for. |
− | sp | + | sp -- Particle array |
|5=<pre></pre>}} | |5=<pre></pre>}} | ||
Remove all particles in the Particle System.
This method also removes the particles from any linked sub-emitters. Use the withChildren parameter to remove particles from child Particle Systems that are not sub-emitters of the system.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--remove all particles, parameter you passed to decide whether clear children as well.
Remove all particles in the Particle System.
This method also removes the particles from any linked sub-emitters. Use the withChildren parameter to remove particles from child Particle Systems that are not sub-emitters of the system.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--remove all particles, parameter you passed to decide whether clear children as well.
Emit 'count' particles immediately.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set max particles to 100 and emit 20 particles.
particles.MaxParticles = 100
Returns True if the Particle System contains live particles or is still creating new particles. False if the Particle System has stopped emitting particles and all particles are dead. Parameter withChildren: checks all child Particle Systems as well.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--output whether particle system contains live particles or active to procedure particles.
Pauses the system so no new particles are emitted and the existing particles are not updated.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--pause particle system, parameter you passed to decide whether pause children as well.
Pauses the system so no new particles are emitted and the existing particles are not updated. Parameter: withChildren: Pauses all child Particle Systems as well.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--pause particle system, parameter you passed to decide whether pause children as well.
Sets the Particle Systems into play mode and enables emitting (if it has been disabled).
If the Particle System has been paused, then this resumes playing from the previous time. If the Particle System has stopped, then the system starts from time 0, and, if it is relevant, the startDelay is applied.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--start particle system to play, you can give a bool parameter to decide whether play children as well.
Sets the Particle Systems into play mode and enables emitting (if it has been disabled).
If the Particle System has been paused, then this resumes playing from the previous time. If the Particle System has stopped, then the system starts from time 0, and, if it is relevant, the startDelay is applied. Parameter withChildren: Plays all child Particle Systems as well.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--start particle system to play, you can give a bool parameter to decide whether play children as well.
Fast-forwards the Particle System by simulating particles over 'time' seconds, then pauses it.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--similate to 3 seconds and pause.
Stops playing the Particle System.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--stop particle system, you can give a bool parameter to decide whether stop children as well.
Stops playing the Particle System. Parameter withChildren: Plays all child Particle Systems as well.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--stop particle system, you can give a bool parameter to decide whether stop children as well.
Get the particles that met the condition in the particle trigger module. his method is typically called from MonoBehaviour.OnParticleTrigger in response to a trigger callback. type - Type of trigger to return particles for.
Write modified particles back to the Particle System, during a call to OnParticleTrigger. type - Type of trigger to return particles for. sp -- Particle array
The duration of the Particle System in seconds.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--subscribe to update, to output duration per frame.
function OutputDuration()
Space.Log(particles.Duration)
end
spawningparticles.SubscribeToEvents()
spawningparticles.OnUpdate(OutputDuration)
The rate of particle emission.
Space.Host.ExecutingObject.ParticleSystem.EmissionRate = 10
The rate at which the emitter spawns new particles over distance. The emitter only spawns new particles when it moves.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set emission rate overtime to 10.
The rate at which the emitter spawns new particles over time.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set emission rate overtime to 10.
When set to false, the Particle System will not emit particles.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--disable emission.
A scale that this Particle System applies to gravity.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set gravity modifier to 1, as normal gravity.
Determines whether the Particle System is emitting particles. A Particle System may stop emitting when its emission module has finished, it has been paused or if the system has been stopped.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--stop particle system and output emitting status.
particles.Pause(true)
Determines whether the Particle System is paused.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--pause particles and output particle is paused status.
particles.Pause(true)
Determines whether the Particle System is playing.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--output is playing status.
Determines whether the Particle System is stopped.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--stop particles and output particle is stopped status.
particles.Stop(true)
Specifies whether the Particle System is looping. If you disable looping on a playing Particle System, it stops at the end of the current loop.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set particle system looping to false.
The maximum number of particles to emit.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set max particles to 100.
The current number of particles.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set a coroutine to check out particle count per period.
local function ToCheckParticleCount()
coroutine.yield(10)
Space.Log(particles.ParticleCount)
end
The playback speed of the Particle System. 1 is normal playback speed.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set playback speed to 2.
If set to true, the Particle System will automatically start playing on startup. Note that this setting is shared between all Particle Systems in the current particle effect.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--disable play on awake.
Override the random seed used for the Particle System emission.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set random seed.
particles.UseAutoRandomSeed = false
The initial color of particles when the Particle System first spawns them.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set start color as pure red.
Start delay in seconds. Use this to delay when playback starts on the system.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set start delay property to 5.
The total lifetime in seconds that particles will have when emitted. When using curves, this value acts as a scale on the curve. This value is set in the particle when it is created by the Particle System.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set start lifetime to 20 seconds.
The initial rotation of particles when emitted. When using curves, this value acts as a scale on the curve. Note that the value should be given in radians.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set start rotation to 90 degrees.
The initial 3D rotation of particles when emitted. When using curves, this value acts as a scale on the curves. Note that the values are Euler angles and should be given in radians.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set start rotation to 90 degrees of Y axis and 90 degrees of Z axis.
The initial size of particles when the Particle System first spawns them.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set start size to 10.
The initial speed of particles when the Particle System first spawns them.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--set start speed to 10.
Playback position in seconds. Use this to read current playback time or to seek to a new playback time.
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--particle start to play at seconds 2.
particles.Play(true)particles.Time= 2
Controls whether the Particle System uses an automatically-generated random number to seed the random number generator. If set to true, the Particle System will generate a new random seed each time it is played. If set to false, ParticleSystem.randomSeed will be used instead, allowing for a constant seed (useful if you want your particles to play in exactly the same way each time) or user-defined random value (for example, you may want to cycle through an array of seeds).
--get particle object and get the particle system component on it.
particles=spawningparticles.ParticleSystem
--disable UseAutoRandomSeed.
|