UnityEngine.ParticleSystem.Stop C# (CSharp) Method

Stop() private method

private Stop ( ) : void
return void
        public void Stop()
        {
            bool withChildren = true;
            this.Stop(withChildren);
        }

Same methods

ParticleSystem::Stop ( [ withChildren ) : void
ParticleSystem::Stop ( bool 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