First Reward system (Gold)

This commit is contained in:
Antoine H 2021-01-07 14:45:19 +01:00
parent caf73dfc25
commit 998cc81e0a
5 changed files with 33 additions and 6 deletions

View file

@ -6,7 +6,7 @@ using UnityEditor;
//Define the system managing the clients. (Singleton)
public sealed class ClientManager : MonoBehaviour
{
int nbMaxClients = 10;
int nbMaxClients = 1;
bool clientSpawnReady = false;
float clientSpawnTimer = 0.5f; //Intial time before first spawn (pseudo-random after that)
float maxTimeNewClients = 2.0f;
@ -40,6 +40,12 @@ public sealed class ClientManager : MonoBehaviour
return false; //No new client
}
//TODO: Reputation
public void clientReward(int money)
{
GameSystem.Instance.gold+=money;
}
//Destroy a client
public void clientLeave(GameObject client)
{