Example #1
0
    static int Stop(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1)
        {
            ParticleSystem obj = (ParticleSystem)LuaScriptMgr.GetUnityObjectSelf(L, 1, "ParticleSystem");
            obj.Stop();
            return(0);
        }
        else if (count == 2)
        {
            ParticleSystem obj  = (ParticleSystem)LuaScriptMgr.GetUnityObjectSelf(L, 1, "ParticleSystem");
            bool           arg0 = LuaScriptMgr.GetBoolean(L, 2);
            obj.Stop(arg0);
            return(0);
        }
        else if (count == 3)
        {
            ParticleSystem             obj  = (ParticleSystem)LuaScriptMgr.GetUnityObjectSelf(L, 1, "ParticleSystem");
            bool                       arg0 = LuaScriptMgr.GetBoolean(L, 2);
            ParticleSystemStopBehavior arg1 = (ParticleSystemStopBehavior)LuaScriptMgr.GetNetObject(L, 3, typeof(ParticleSystemStopBehavior));
            obj.Stop(arg0, arg1);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: ParticleSystem.Stop");
        }

        return(0);
    }
Example #2
0
    protected IEnumerator PlayForLimitedTimeEnumerator(TEnum effect, float duration, ParticleSystemStopBehavior stopBehaviour)
    {
        Play(effect);
        yield return(new WaitForSecondsRealtime(duration));

        Stop(effect, stopBehaviour);
    }
Example #3
0
 override public void StopVFX(ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting)
 {
     trail.enabled = false;
     trailParticle.Stop(true, stopBehavior);
     fire.Stop(true, stopBehavior);
     smoke.Stop(true, stopBehavior);
 }
Example #4
0
        protected override void StopInternal(VisualEffectStopMethod stopMethod)
        {
            //IL_0008: Unknown result type (might be due to invalid IL or missing references)
            //IL_0029: Unknown result type (might be due to invalid IL or missing references)
            //IL_002e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0032: Unknown result type (might be due to invalid IL or missing references)
            //IL_0044: Unknown result type (might be due to invalid IL or missing references)
            List <ParticleSystem>      particleSystems = m_particleSystems;
            ParticleSystemStopBehavior val             = stopMethod;
            int count = particleSystems.Count;

            for (int i = 0; i < count; i++)
            {
                ParticleSystem val2 = particleSystems[i];
                if (null != val2)
                {
                    MainModule main = val2.get_main();
                    if ((int)main.get_ringBufferMode() != 0)
                    {
                        main.set_ringBufferMode(0);
                    }
                    val2.Stop(false, val);
                }
            }
        }
Example #5
0
 /// <summary> Stops the target ParticleSystem from emitting any further particles using the given stopBehavior </summary>
 /// <param name="stopBehavior"> Behavior applied when stopping </param>
 public void Stop(ParticleSystemStopBehavior stopBehavior)
 {
     if (ParticleSystem == null)
     {
         return;
     }
     ParticleSystem.Stop(true, stopBehavior);
 }
 public override void Stop(NpcCharacterEffect effect, ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting)
 {
     switch (effect)
     {
     case NpcCharacterEffect.NoMeatBought:
         NoMeatBoughtScaleOutTween.Play(() => NoMeatBoughtScaleOutTween.gameObject.SetActive(false));
         break;
     }
 }
Example #7
0
 /// <summary> Resets this instance to the default values </summary>
 public void Reset()
 {
     Behavior           = DEFAULT_BEHAVIOR;
     StopBehavior       = DEFAULT_STOP_BEHAVIOR;
     AutoSort           = DEFAULT_AUTO_SORT;
     SortingSteps       = DEFAULT_SORTING_STEPS;
     CustomSortingLayer = DEFAULT_SORTING_LAYER;
     CustomSortingOrder = DEFAULT_SORTING_ORDER;
 }
 public override void PlayForLimitedTime(VehicleEffect effect, float duration, ParticleSystemStopBehavior stopBehaviour)
 {
     switch (effect)
     {
     case VehicleEffect.TiresSmoke:
         if (!leftTireSmoke.isPlaying || !rightTireSmoke.isPlaying)
         {
             StartCoroutine(PlayForLimitedTimeEnumerator(effect, duration, stopBehaviour));
         }
         break;
     }
 }
Example #9
0
    public override void Stop(PlayerVehicleEffect effect, ParticleSystemStopBehavior stopBehavior)
    {
        switch (effect)
        {
        case PlayerVehicleEffect.GatheringSmoke:
            gatheringSmoke.Stop(true, stopBehavior);
            break;

        case PlayerVehicleEffect.GatheringFinishedSuccessfully:
            gatheringFinishedSuccessfully.Stop(true, stopBehavior);
            break;
        }
    }
Example #10
0
 public override void Stop(VehicleEffect effect, ParticleSystemStopBehavior stopBehavior)
 {
     switch (effect)
     {
     case VehicleEffect.TiresSmoke:
         if (leftTireSmoke.isPlaying)
         {
             leftTireSmoke.Stop(true, stopBehavior);
         }
         if (rightTireSmoke.isPlaying)
         {
             rightTireSmoke.Stop(true, stopBehavior);
         }
         break;
     }
 }
Example #11
0
    public void Deactivate(bool clearEmissions = true)
    {
        ParticleSystemStopBehavior stopBehavior = (clearEmissions ? ParticleSystemStopBehavior.StopEmittingAndClear : ParticleSystemStopBehavior.StopEmitting);

        mainParticleSystem.Stop(true, stopBehavior);
    }
 extern public void Stop(bool withChildren, ParticleSystemStopBehavior stopBehavior);
Example #13
0
        public static void ClusterStop(this UnityEngine.ParticleSystem ps, bool withChildren, ParticleSystemStopBehavior stopBehavior)
        {
            var observer = validateCheck(ps);

            if (observer == null)
            {
                return;
            }
            ps.Stop(withChildren, stopBehavior);
            FduParticleSystemOP op = new FduParticleSystemOP();

            op.operation = FduParticleSystemOP.Operation.stop;
            op.paras     = new object[2];
            op.paras[0]  = withChildren;
            op.paras[1]  = (byte)stopBehavior;
            observer.addOperation(op);
        }
Example #14
0
 override public void StopVFX(ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting)
 {
     gatherParticle.Stop(true, stopBehavior);
     ring.Stop(true, stopBehavior);
 }
 public override void PlayForLimitedTime(NpcCharacterEffect effect, float duration, ParticleSystemStopBehavior stopBehaviour = ParticleSystemStopBehavior.StopEmitting)
 {
     StartCoroutine(PlayForLimitedTimeEnumerator(effect, duration, stopBehaviour));
 }
Example #16
0
 virtual public void StopVFX(ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting)
 {
     mainPtc.Stop(true, stopBehavior);
 }
Example #17
0
 public override void PlayForLimitedTime(PlayerVehicleEffect effect, float duration, ParticleSystemStopBehavior stopBehaviour)
 {
     throw new System.NotImplementedException();
 }
Example #18
0
    public virtual void Stop(ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting)
    {
        this.main.Stop();

        PoolingManager.instance?.Stow(this);
    }
Example #19
0
 public abstract void Stop(TEnum effect, ParticleSystemStopBehavior stopBehavior);
 extern public void Stop([DefaultValue("true")] bool withChildren, [DefaultValue("ParticleSystemStopBehavior.StopEmitting")] ParticleSystemStopBehavior stopBehavior);
Example #21
0
 public virtual void PlayForLimitedTime(TEnum effect, float duration, ParticleSystemStopBehavior stopBehaviour)
 {
     StartCoroutine(PlayForLimitedTimeEnumerator(effect, duration, stopBehaviour));
 }