/// <summary> /// 我方胜利 /// </summary> public void PlayerWin() { if (!_isEventHasBeenLaunched) { resultUI.isWin = true; resultUI.ShowResult(); winEvent.Invoke(); DataTransfer.GetDataTransfer.xmlSaver.SaveData(); _isEventHasBeenLaunched = true; } }
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)); } } }