예제 #1
0
 /// <summary>
 ///     我方胜利
 /// </summary>
 public void PlayerWin()
 {
     if (!_isEventHasBeenLaunched)
     {
         resultUI.isWin = true;
         resultUI.ShowResult();
         winEvent.Invoke();
         DataTransfer.GetDataTransfer.xmlSaver.SaveData();
         _isEventHasBeenLaunched = true;
     }
 }
예제 #2
0
    private void Update()
    {
        if (Debuger.playType != PlayType.Normal)
        {
            float oldTimer = timer;
            timer = timer - Time.deltaTime; //Mathf.Max(timer - Time.deltaTime, 0f);

            if (!(timer > 0f))
            {
                result.ShowResult(GameResult.Failed);
            }

            if (Mathf.CeilToInt(oldTimer) != Mathf.CeilToInt(timer))
            {
                UpdateTimeLabel(Mathf.Max(timer));
            }
        }
    }