mirror of
https://github.com/ConjureETS/Human-Farm-Tycoon.git
synced 2026-03-24 02:11:07 +00:00
Added some missing variables in Stats. (Humans, Zombies)
This commit is contained in:
parent
00ac24146f
commit
e1389233cb
@ -7,18 +7,11 @@ public class Stats : MonoBehaviour {
|
||||
private int amountOfWood;
|
||||
private int amountOfCorpse;
|
||||
private int amountOfMeat;
|
||||
|
||||
private int amountOfZombies;
|
||||
private int amountOfHumans;
|
||||
private int amountOfZombiesAvail;
|
||||
|
||||
public Stats(int nbRock, int nbWood, int nbCorpse, int nbMeat, int nbHumans, int nbZombies)
|
||||
{
|
||||
AmountOfCorpse = nbCorpse;
|
||||
AmountOfMeat = nbMeat;
|
||||
AmountOfRock = nbRock;
|
||||
AmountOfWood = nbWood;
|
||||
}
|
||||
|
||||
public int AmountOfMeat
|
||||
{
|
||||
get { return amountOfMeat; }
|
||||
@ -61,6 +54,21 @@ public class Stats : MonoBehaviour {
|
||||
set { amountOfZombiesAvail = value; }
|
||||
}
|
||||
|
||||
public Stats(int nbRock, int nbWood, int nbCorpse, int nbMeat, int nbHumans, int nbZombies)
|
||||
{
|
||||
resetStats(nbRock, nbWood, nbCorpse, nbMeat, nbHumans, nbZombies);
|
||||
}
|
||||
|
||||
public void resetStats(int nbRock, int nbWood, int nbCorpse, int nbMeat, int nbHumans, int nbZombies)
|
||||
{
|
||||
AmountOfCorpse = nbCorpse;
|
||||
AmountOfMeat = nbMeat;
|
||||
AmountOfRock = nbRock;
|
||||
AmountOfWood = nbWood;
|
||||
AmountOfHumans = nbHumans;
|
||||
AmountOfZombies = nbZombies;
|
||||
}
|
||||
|
||||
public void addCorpse()
|
||||
{
|
||||
amountOfCorpse++;
|
||||
@ -81,12 +89,59 @@ public class Stats : MonoBehaviour {
|
||||
amountOfRock++;
|
||||
}
|
||||
|
||||
public void addZombie()
|
||||
{
|
||||
amountOfZombies++;
|
||||
}
|
||||
|
||||
public void addHuman()
|
||||
{
|
||||
amountOfHumans++;
|
||||
}
|
||||
|
||||
public void addZombieAvail()
|
||||
{
|
||||
amountOfZombiesAvail++;
|
||||
}
|
||||
|
||||
public void removeCorpse()
|
||||
{
|
||||
amountOfCorpse--;
|
||||
}
|
||||
|
||||
public void removeWood()
|
||||
{
|
||||
amountOfWood--;
|
||||
}
|
||||
|
||||
public void removeMeat()
|
||||
{
|
||||
amountOfMeat--;
|
||||
}
|
||||
|
||||
public void removeRock()
|
||||
{
|
||||
amountOfRock--;
|
||||
}
|
||||
|
||||
public void removeZombie()
|
||||
{
|
||||
amountOfZombies--;
|
||||
}
|
||||
|
||||
public void removeHuman()
|
||||
{
|
||||
amountOfHumans--;
|
||||
}
|
||||
|
||||
public void removeZombieAvail()
|
||||
{
|
||||
amountOfZombiesAvail--;
|
||||
}
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
AmountOfCorpse = 1;
|
||||
AmountOfMeat = 2;
|
||||
AmountOfRock = 3;
|
||||
AmountOfWood = 4;
|
||||
resetStats(0, 0, 0, 0, 4, 1);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user