2024-04-05 13:18:15 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class DeveloperNeeds : MonoBehaviour
|
|
|
|
{
|
2024-04-05 14:08:45 +02:00
|
|
|
[SerializeField] List<GameObject> Needs = new List<GameObject>();
|
2024-04-05 13:18:15 +02:00
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2024-04-05 14:08:45 +02:00
|
|
|
|
|
|
|
public void spawnNeed(string needName)
|
|
|
|
{
|
|
|
|
switch (needName)
|
|
|
|
{
|
|
|
|
case "coffee":
|
|
|
|
Instantiate(Needs[0], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
|
|
|
break;
|
|
|
|
case "mate":
|
|
|
|
Instantiate(Needs[1], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
|
|
|
break;
|
|
|
|
case "toilet":
|
|
|
|
Instantiate(Needs[2], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
|
|
|
break;
|
|
|
|
case "money":
|
|
|
|
Instantiate(Needs[3], new Vector3(transform.position.x, transform.position.y + 1.0f, transform.position.z), Quaternion.identity);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2024-04-05 13:18:15 +02:00
|
|
|
}
|