| | |
| | | public TextMeshProUGUI timeStatic = null; |
| | | |
| | | /// <summary> |
| | | /// 选择buff界面 |
| | | /// 结算界面 |
| | | /// </summary> |
| | | public GameObject SelectBuffUI; |
| | | public GameObject SettlementUI; |
| | | |
| | | /// <summary> |
| | | /// 倒计时整体的背景图片Mask |
| | |
| | | |
| | | protected bool[] bVibrate; |
| | | |
| | | private bool isPause; |
| | | |
| | | // Start is called before the first frame update |
| | | void Start() |
| | | { |
| | |
| | | |
| | | if (timeStatic) |
| | | timeStatic.gameObject.SetActive(false); |
| | | SelectBuffUI.SetActive(false); |
| | | EndlessBuffSelect.instance.HideBuffUI(); |
| | | EndlessBossHPManager.instance.HideHP(); |
| | | SettlementUI.SetActive(false); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | public void Pause() |
| | | { |
| | | isPause = true; |
| | | } |
| | | |
| | | public void Restart() |
| | | { |
| | | isPause = false; |
| | | } |
| | | |
| | | public bool IsGameRunning { get { return !isPause; } } |
| | | |
| | | // Update is called once per frame |
| | | void Update() |
| | | { |
| | | if (isPause) return; |
| | | |
| | | if (bGameStart) |
| | | { |
| | | startTime += Time.deltaTime; |
| | | timeTextNew.text = ConvertTime((float)Math.Ceiling(startTime)); |
| | | } |
| | | |
| | | if ((!bFirstLoaded) && (!bGameStart)) |
| | | if (!bFirstLoaded && !bGameStart) |
| | | { |
| | | bFirstLoaded = true; |
| | | secToDo = 4; |
| | | } |
| | | |
| | | if (bFirstLoaded && (!bGameStart)) |
| | | if (bFirstLoaded && !bGameStart) |
| | | { |
| | | secToDo -= (Time.deltaTime * 1.0f); // 放慢时间用于调试 |
| | | secToDo -= Time.deltaTime; |
| | | |
| | | if (secToDo >= 3) |
| | | { |
| | |
| | | { |
| | | uiStartMssk.gameObject.SetActive(false); |
| | | countDownTextNew.text = ""; |
| | | |
| | | bGameStart = true; |
| | | // 开始关卡 |
| | | EndlessLevelManager.instance.StartLevel(); |
| | | |
| | | timeTextNew.gameObject.SetActive(true); |
| | | bGameStart = true; |
| | | |
| | | // 开始播放背景音乐. |
| | | if (bgMusic != null) |