UnityEngine.ParticleSystem.Stop C# (CSharp) Method

Stop() public method

public Stop ( bool withChildren ) : void
withChildren bool
return void
		public void Stop(bool withChildren){}
		public void Pause(){}

Same methods

ParticleSystem::Stop ( ) : void
ParticleSystem::Stop ( [ withChildren ) : void

Usage Example

コード例 #1
0
    // Start
    void Start()
    {
        myParticleSystem = particleSystem;

        // Server side doesn't compute particles
        if(uLink.Network.isServer) {
            // Disable emission
            myParticleSystem.enableEmission = false;

            if(!myParticleSystem.isStopped)
                myParticleSystem.Stop();

            // Is there a delayed explosion component?
            var delayedExplosion = GetComponent<DelayedExplosion>();

            // Destroy this object after the standard duration of the particle system
            if(delayedExplosion == null)
                Destroy(gameObject, myParticleSystem.duration);
            else
                Destroy(gameObject, delayedExplosion.delayTime + 0.1f);

            // No LateUpdate on the server
            enabled = false;
        }
    }
All Usage Examples Of UnityEngine.ParticleSystem::Stop