コード例 #1
0
        public void Restart()
        {
            OnRestart?.Invoke();
            Player.Instance.SetPosition(playerInitPosition);
            toolsCollected = 0;
            gameTime       = TimeToFinish.ToFloat();
            stGameTime     = new StandardTime();
            stGameTime.ConvertFrom(gameTime);

            ResumeGame();
            UpdateGameUI();
        }
コード例 #2
0
        private IEnumerator CheckForEndAnimation()
        {
            float animTime = animDuration.ToFloat();

            while (animTime > 0)
            {
                animTime -= Time.fixedDeltaTime /** animCtrls[0].speed*/;
                yield return(new WaitForFixedUpdate());
            }
            SetAnimState(-1);
            OnAnimEnd?.Invoke();
            Player.Instance.InputCtrl.ResetMovement();
        }