Beispiel #1
0
    private void Update()
    {
        if (_fsmSystem != null)
        {
            _fsmSystem.Update();
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            if (_fsmSystem != null)
            {
                _fsmSystem.SetTransition((int)State.C);
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (_fsmSystem != null)
            {
                _fsmSystem.TurnDefault();
            }
        }
    }
Beispiel #2
0
        /// <summary>
        /// 延迟跳转页面
        /// </summary>
        private IEnumerator DelayTurnView()
        {
            yield return(new WaitForSeconds(3));

            if (_permit)
            {
                if (_viewModel != null)
                {
                    _fadeoutTween = DOTween.To(() => _viewModel.RecAlpha, x => _viewModel.RecAlpha = x, 0, 1)
                                    .SetEase(Ease.Linear)
                                    .OnComplete(() =>
                    {
                        UIManager.Instance.Enter(ViewId.MemoView, true, () =>
                        {
                            UIManager.Instance.Quit(ViewId.FaceRecView, false, null, true);
                        });
                    });
                }
            }
            else
            {
                _fsmSystem.TurnDefault();
            }
        }