Multiple needs handling and zombie shit
This commit is contained in:
@ -24,14 +24,14 @@ public class DeveloperNeeds : MonoBehaviour
|
||||
|
||||
// TODO: Enums statt strings verwenden
|
||||
// TODO: Multiple Needs möglich übereinander anzeigen?
|
||||
|
||||
public GameObject SpawnCoffeeNeed() => spawnNeed("coffee");
|
||||
public GameObject SpawnMateNeed() => spawnNeed("mate");
|
||||
public GameObject SpawnToiletNeed() => spawnNeed("toilet");
|
||||
public GameObject SpawnHungerNeed() => spawnNeed("hunger");
|
||||
public GameObject SpawnMoneyNeed() => spawnNeed("money");
|
||||
|
||||
public GameObject spawnNeed(string needName)
|
||||
public GameObject SpawnCoffeeNeed(int numNeeds) => spawnNeed("coffee", numNeeds);
|
||||
public GameObject SpawnMateNeed(int numNeeds) => spawnNeed("mate", numNeeds);
|
||||
public GameObject SpawnToiletNeed(int numNeeds) => spawnNeed("toilet", numNeeds);
|
||||
public GameObject SpawnHungerNeed(int numNeeds) => spawnNeed("hunger", numNeeds);
|
||||
public GameObject SpawnMoneyNeed(int numNeeds) => spawnNeed("money", numNeeds);
|
||||
|
||||
public GameObject spawnNeed(string needName, float numNeeds)
|
||||
{
|
||||
|
||||
GameObject spawnedNeed = null;
|
||||
@ -40,20 +40,20 @@ public class DeveloperNeeds : MonoBehaviour
|
||||
switch (needName)
|
||||
{
|
||||
case "coffee":
|
||||
spawnedNeed = Instantiate(Needs[0], new Vector3(0.0f, 2f, 0.0f), Needs[0].transform.rotation);
|
||||
context = "The NPC wants coffee";
|
||||
spawnedNeed = Instantiate(Needs[0], new Vector3(0.0f, 2f + (numNeeds * 0.5f), 0.0f), Needs[0].transform.rotation);
|
||||
context = "The Developer wants coffee";
|
||||
break;
|
||||
case "mate":
|
||||
spawnedNeed = Instantiate(Needs[1], new Vector3(0.0f, 2f, 0.0f), Needs[0].transform.rotation);
|
||||
context = "The NPC wants a Blub Mate (Yes, its a drink called Blub Mate)";
|
||||
spawnedNeed = Instantiate(Needs[1], new Vector3(0.0f, 2f + (numNeeds * 0.5f), 0.0f), Needs[0].transform.rotation);
|
||||
context = "The Developer wants a Blub Mate (Yes, its a drink called Blub Mate)";
|
||||
break;
|
||||
case "toilet":
|
||||
spawnedNeed = Instantiate(Needs[2], new Vector3(0.0f, 2f, 0.0f), Needs[0].transform.rotation);
|
||||
context = "The NPC wants to go to the toilet, toilet is clogged and dirty";
|
||||
spawnedNeed = Instantiate(Needs[2], new Vector3(0.0f, 2f + (numNeeds * 0.5f), 0.0f), Needs[0].transform.rotation);
|
||||
context = "The Developer wants to go to the toilet, toilet is clogged and dirty";
|
||||
break;
|
||||
case "money":
|
||||
spawnedNeed = Instantiate(Needs[3], new Vector3(0.0f, 2f, 0.0f), Needs[0].transform.rotation);
|
||||
context = "The NPC wants a raise, The NPC needs more money";
|
||||
case "hunger":
|
||||
spawnedNeed = Instantiate(Needs[3], new Vector3(0.0f, 2f + (numNeeds * 0.5f), 0.0f), Needs[0].transform.rotation);
|
||||
context = "The Developer wants a pizza";
|
||||
break;
|
||||
default:
|
||||
Debug.LogError($"Unbekannter need \"{needName}\"");
|
||||
|
||||
Reference in New Issue
Block a user