using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using XUI; public class GameEndPanel : UIBehaviour { public TMP_Text timeText; public GameObject win; public GameObject lose; public static void Show(params object[] args) { WorldUIManager.Ins.Cover("UI/GameEndPanel", false,args); } public override void OnUIShow(params object[] args) { base.OnUIShow(args); win.SetActive((bool)args[0]); lose.SetActive(!(bool)args[0]); float second = GameManager.Ins.curTime; if (second / 60 < 1) { if (second < 4) { } timeText.text = string.Format("00:{0:d2}", (int)second % 60); } else { timeText.text = string.Format("{0:d2}:{1:d2}", (int)second / 60, (int)second % 60); } } }