Пример #1
0
    protected void OnLifeEnd()
    {
        if (IsCached && ID == 0)
        {
            return;
        }

        _IsPlaying = false;
        _PlaySpeed = -1;
        Priority   = 50;
        //gameObject.SetActive(false);
        ID                   = 0;
        RealScale            = 1f;
        transform.localScale = Vector3.one;

        if (ArcReactor != null)
        {
            ArcReactor.Set(null, null);
        }

        if (EarlyWarning != null)
        {
            EarlyWarning.Set(-1, 0, Vector3.zero, false);
        }

        if (RadialBlurBoot != null)
        {
            RadialBlurBoot.Set(0, 0, 0, 0, 0);
        }

        _CorrectBluntSpeed = 0f;
        if (IsInvoking("ExitBluntState"))
        {
            CancelInvoke("ExitBluntState");
        }

        if (_FxProxy != null)
        {
            _FxProxy.Deactive();
        }

        if (OnStop != null)
        {
            OnStop(this);
        }

        OnPlay = null;
        OnStop = null;
    }
Пример #2
0
 void OnDisable()
 {
     if (_FxProxy != null)
     {
         _FxProxy.Deactive();
     }
 }