jetzt richtig
This commit is contained in:
@ -34,6 +34,7 @@ public class NPC_Behavior : MonoBehaviour
|
||||
|
||||
private GameManager _gameManager;
|
||||
private DeveloperNeeds _developerNeeds;
|
||||
private bool spawned = true;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@ -46,9 +47,11 @@ public class NPC_Behavior : MonoBehaviour
|
||||
void Update()
|
||||
{
|
||||
// fire event
|
||||
if (UnityEngine.Random.Range(0, 60) == 0)
|
||||
if (spawned)
|
||||
{
|
||||
Debug.Log("TEST");
|
||||
spawned = false;
|
||||
List<string> needs = new List<string>() { "coffee", "mate", "toilet", "money" };
|
||||
_developerNeeds.spawnNeed(needs[UnityEngine.Random.Range(0, 3)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user