mirror of
https://github.com/ConjureETS/Human-Farm-Tycoon.git
synced 2026-03-24 02:11:07 +00:00
Modification of the name of a class.
This commit is contained in:
parent
93d52ee2a8
commit
dc07b32057
39
Assets/Controller/WorkerController.cs
Normal file
39
Assets/Controller/WorkerController.cs
Normal 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 () {
|
||||
|
||||
}
|
||||
}
|
||||
@ -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 () {
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user