| 123456789101112131415161718192021222324252627 |
- 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<Text>();
- t2 = this.transform.Find("T2").GetComponent<Text>();
- gameMode = (RabbitHuntGameMode) GameMgr.ins.gameMode;
- }
-
- void FixedUpdate()
- {
- t1.text = "剩余野兔:" + gameMode.GetSurplusAnimalCount();
- t2.text = gameMode.GetTimeStr();
- if (GameMgr.ins.gameOver) {
- Destroy(this.gameObject);
- }
- }
- }
|