using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class HunterGameView : MonoBehaviour { Text t1; Text t2; RabbitHuntGameMode gameMode; void Start() { t1 = this.transform.Find("T1").GetComponent(); t2 = this.transform.Find("T2").GetComponent(); gameMode = (RabbitHuntGameMode) GameMgr.ins.gameMode; } void FixedUpdate() { t1.text = "剩余野兔:" + gameMode.GetSurplusAnimalCount(); t2.text = gameMode.GetTimeStr(); if (GameMgr.ins.gameOver) { Destroy(this.gameObject); } } }