Пример #1
0
 public virtual void StopMove()
 {
     if (pathMgr != null)
     {
         pathMgr.DOPause();
     }
 }
Пример #2
0
 private void CheckPath()
 {
     if (isMove)
     {
         dotweenPath.DOPlay();
     }
     else
     {
         dotweenPath.DOPause();
     }
 }
Пример #3
0
 public void PauseMovingOnPath(bool playIdle)
 {
     if (m_currentPath != null)
     {
         m_currentPath.DOPause();
         if (playIdle)
         {
             SetSteMachineToIdle();
         }
     }
 }
Пример #4
0
 private void OnImageCrabClick(UISceneWidget eventObj)
 {
     tween.DOPause();
     image_Crab.DORewind();
     image_Crab.transform.DOLocalMove(new Vector3(image_Crab.transform.localPosition.x, -1000, 0), 0.5f).OnComplete(() => {
         StartCoroutine(Wait(3, () => {
             image_Crab.transform.DOLocalMove(initPos, 1).OnComplete(() => {
                 tween.DORestart();
             });
         }));
     });
 }
Пример #5
0
    IEnumerator Show()
    {
        FishState temp = state;

        state = FishState.show;


        if (temp == FishState.move)
        {
            path.DOPause();
        }
        if (temp == FishState.idle)
        {
            anim.speed = 1.0f;
        }

        state = FishState.show;
        Vector3 towards = transform.forward;

        transform.DOLookAt(lookAtCamera.position, 0.5f);
        yield return(new WaitForSeconds(0.5f));

        anim.Play("jump");
        yield return(new WaitForSeconds(0.5f));

        //transform.DOLookAt(towards, 0.5f);
        //yield return new WaitForSeconds(0.5f);

        state = temp;
        if (state == FishState.idle)
        {
            anim.speed = 0.1f;
        }
        if (state == FishState.move)
        {
            path.DOPlay();
        }
    }
Пример #6
0
    void Start()
    {
        Curves = ListExtension.Shuffle <AnimationCurve>(Curves);
        for (int i = 0; i < Blossoms.Count; i++)
        {
            DOTweenPath path = Blossoms[i].GetComponent <DOTweenPath>();
            Tween       t    = path.GetTween();
            t.SetEase(Curves[i]);
            path.DOPause();
        }

        for (int i = 0; i < Blossoms.Count; i++)
        {
            DoneBlossoms.Add(false);
        }
        StartRace();
    }
Пример #7
0
    protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
    {
        switch (Mode)
        {
        case Modes.DOPlay:
            TargetDOTweenPath.DOPlay();
            break;

        case Modes.DOPlayBackwards:
            TargetDOTweenPath.DOPlayBackwards();
            break;

        case Modes.DOPlayForward:
            TargetDOTweenPath.DOPlayForward();
            break;

        case Modes.DOPause:
            TargetDOTweenPath.DOPause();
            break;

        case Modes.DOTogglePause:
            TargetDOTweenPath.DOTogglePause();
            break;

        case Modes.DORewind:
            TargetDOTweenPath.DORewind();
            break;

        case Modes.DORestart:
            TargetDOTweenPath.DORestart();
            break;

        case Modes.DOComplete:
            TargetDOTweenPath.DOComplete();
            break;

        case Modes.DOKill:
            TargetDOTweenPath.DOKill();
            break;
        }
    }
 void OnDisable()
 {
     tweenPath.DOPause();
 }