Beispiel #1
0
    public IEnumerator ShowEventPoints(float score)
    {
        text_new_level.enabled = true;
        text_new_level.text    = "YOU GOT " + score.ToString() + " SCORE!";
        dotween.DOPlay();
        yield return(new WaitForSeconds(3f));

        dotween.DORewind();
        text_new_level.enabled = false;
    }
Beispiel #2
0
	void OnGUI()
	{
		if (GUILayout.Button("Rewind and Play")) {
			dotweenAnimation.DORewind();
			dotweenAnimation.DOPlay();
		}
	}
Beispiel #3
0
 private void OnCollisionExit2D(Collision2D other)
 {
     if (other.gameObject.GetComponent <Player>())
     {
         _shakeAnimation.DORewind();
         _colliding = false;
     }
 }
Beispiel #4
0
        private void ToggleCue(bool toggle, Direction direction)
        {
            if (toggle)
            {
                switch (direction)
                {
                case Direction.Up:
                    m_upDot.DOPlayForward();
                    break;

                case Direction.Down:
                    m_downDot.DOPlayForward();
                    break;

                case Direction.Left:
                    m_leftDot.DOPlayForward();
                    break;

                case Direction.Right:
                    m_rightDot.DOPlayForward();
                    break;
                }
            }
            else
            {
                switch (direction)
                {
                case Direction.Up:
                    m_upDot.DOPause();
                    m_upDot.DORewind();
                    break;

                case Direction.Down:
                    m_downDot.DOPause();
                    m_downDot.DORewind();
                    break;

                case Direction.Left:
                    m_leftDot.DOPause();
                    m_leftDot.DORewind();
                    break;

                case Direction.Right:
                    m_rightDot.DOPause();
                    m_rightDot.DORewind();
                    break;
                }
            }
        }
        static public IObservable <DOTweenAnimation> DOPlayAsObservable(
            this DOTweenAnimation animation,
            bool rewind = false)
        {
            return(Observable.Create <DOTweenAnimation>(o =>
            {
                if (rewind)
                {
                    animation.DORewind();
                }

                animation.tween.OnComplete(() =>
                {
                    o.OnNext(animation);
                    o.OnCompleted();
                });
                animation.DOPlay();
                return Disposable.Empty;
            }));
        }
Beispiel #6
0
    protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
    {
        switch (Mode)
        {
        case Modes.DOPlay:
            TargetDOTweenAnimation.DOPlay();
            break;

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

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

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

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

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

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

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

        case Modes.DOKill:
            TargetDOTweenAnimation.DOKill();
            break;
        }
    }
Beispiel #7
0
        private void RefreshData()
        {
            if (pointDataMgr == null)
            {
                return;
            }
            if (pointDataMgr.isFrozen)
            {
                LockRoot.gameObject.SetActive(false);
                UnlockRoot.gameObject.SetActive(false);
            }
            else
            {
                if (!pointDataMgr.isUnlock)
                {
                    LockRoot.gameObject.SetActive(true);
                    UnlockRoot.gameObject.SetActive(false);
                }
                else
                {
                    LockRoot.gameObject.SetActive(false);
                    UnlockRoot.gameObject.SetActive(true);
                    var reward = pointDataMgr.SettlementRewardVal;
                    if (reward > 0)
                    {
                        RewardCount.text.text = UiTools.FormateMoney(reward);
                        RewardNode.gameObject.SetActive(true);
                    }
                    else
                    {
                        RewardNode.gameObject.SetActive(false);
                    }

                    if (pointDataMgr.equipGunId > 0)
                    {
                        var cardRes = TableMgr.singleton.GunCardTable.GetItemByID(pointDataMgr.equipGunId);
                        CardIconImg.image.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(cardRes.icon);
                        CardIconImg.gameObject.SetActive(true);
                    }
                    else
                    {
                        CardIconImg.gameObject.SetActive(false);
                    }

                    if (pointDataMgr.isAuto)
                    {
                        if (nonAutoAnim.tween.IsPlaying())
                        {
                            nonAutoAnim.DORewind();
                        }
                        ProgressImg.image.color = autoColor;
                    }
                    else
                    {
                        ProgressImg.image.color = nonAutoColor;
                    }

                    if (PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.BuildSetGun) &&
                        CampsiteMgr.singleton.PointCanSetGun(pointDataMgr.index))
                    {
                        RedPoint.gameObject.SetActive(true);
                    }
                    else
                    {
                        RedPoint.gameObject.SetActive(false);
                    }

                    RewardFlag.gameObject.SetActive(!pointDataMgr.isFight);
                }
            }
        }
 private void RewindAllAnimation()
 {
     m_forwardAnimation.DORewind();
     m_backwardAnimation.DORewind();
 }