예제 #1
0
    public static void RePlayMatchingSpeed(GameObject _target, float _duraiton, float _delayTime = 0)
    {
        if (_duraiton == 0)
        {
            return;
        }
        NsEffectManager.RunReplayEffect(_target, true);
        FXRoot fr = _target.GetComponent <FXRoot>();

        if (fr != null)
        {
            if (_delayTime > 0 || _duraiton != fr.length)
            {
                fr.Play(_delayTime, fr.length / _duraiton);
            }
            else
            {
                fr.Play();
            }
        }
        else
        {
            Debug.Log(_target.name + "找不到FXRoot组件!");
        }
    }
예제 #2
0
    public static void RePlay(GameObject _target, float _delayTime = 0)
    {
        NsEffectManager.RunReplayEffect(_target, true);
        FXRoot fr = _target.GetComponent <FXRoot>();

        if (fr != null)
        {
            if (_delayTime > 0)
            {
                fr.Play(_delayTime, 1.0f);
            }
            else
            {
                fr.Play();
            }
        }
        else
        {
            Debug.Log(_target.name + "找不到FXRoot组件!");
        }
    }
예제 #3
0
 void OnEnable()
 {
     if (Effect == null)
     {
         return;
     }
     if (fxRoot == null)
     {
         fxRoot = Effect.GetComponent <FXRoot>();
     }
     if (fxRoot != null)
     {
         fxRoot.Play(0.1f, 1.0f);
     }
     //    GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += OnMainPlayerUpdateLevel;
 }