mirror of
https://github.com/ConjureETS/Human-Farm-Tycoon.git
synced 2026-03-24 10:21:06 +00:00
29 lines
719 B
C#
29 lines
719 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using UnityEngine.UI;
|
|
|
|
public class VillageStatsController : MonoBehaviour {
|
|
|
|
public Text textNbMaison;
|
|
public Text textNbZombie;
|
|
public Text textNbMaxZombie;
|
|
private Stats stats;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
|
|
UpdateView();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
}
|
|
|
|
private void UpdateView(){
|
|
textNbMaison.text = "Nb Maisons : " + stats.AmountZombieHouse;
|
|
textNbZombie.text = "Nb Zombies : " + stats.AmountOfZombies;
|
|
textNbMaxZombie.text = "Max Zombies : " + stats.AmountZombieHouse * 10;
|
|
}
|
|
}
|