Beispiel #1
0
        public void UpdateLives()
        {
            string text = lives.GetLives() > 0 ? "Employees Left: " + lives.GetLives().ToString() : "NO MORE EMPLOYEES";

            foreach (TextMesh textMesh in textMeshes)
            {
                textMesh.text = text;
            }
        }
Beispiel #2
0
        void Start()
        {
            lives      = GameObject.FindObjectOfType <PlayerLives>();
            textMeshes = GetComponentsInChildren <TextMesh>();
            foreach (TextMesh textMesh in textMeshes)
            {
                textMesh.text = lives.GetLives().ToString();
            }

            UpdateLives();
        }
 public int GetLives()
 {
     return(lives.GetLives());
 }