Modification of the name of a class.

This commit is contained in:
Marc-Antoine Dumont 2015-08-12 18:13:42 -04:00
parent 93d52ee2a8
commit dc07b32057
3 changed files with 39 additions and 38 deletions

View File

@ -0,0 +1,39 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class WorkerController : MonoBehaviour{
public Text nbWorker;
public Text zombieAvailable;
public Text nbRessourceExpected;
private Stats stats;
public void AddWorker()
{
stats.AmountOfZombiesAvail --;
UpdateView();
}
public void LessWorker()
{
stats.AmountOfZombiesAvail ++;
UpdateView();
}
public void UpdateView()
{
zombieAvailable.text = stats.AmountOfZombiesAvail + "/" + stats.AmountOfZombies;
}
// Use this for initialization
void Start () {
Stats stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
}
// Update is called once per frame
void Update () {
}
}

View File

@ -1,38 +0,0 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class WorkerToWoodController : MonoBehaviour{
public Text nbWorker;
public Text stats;
/*public Text nbRessourceGet;
public Text nbWorkerLeft;*/
public void AddWorker()
{
stats.text = stats.text + "+1";
UpdateView();
}
public void LessWorker()
{
stats.text = stats.text + "-1";
UpdateView();
}
public void UpdateView()
{
nbWorker.text = stats.text;
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}