Irgendjemand musste es ja machen...

This commit is contained in:
Simon Lübeß
2024-04-09 01:17:44 +02:00
parent 288678f3b5
commit f405a0ef9f
39 changed files with 1727 additions and 419 deletions

View File

@ -11,6 +11,12 @@ public class CoffeeMachine : MonoBehaviour
[SerializeField]
private AudioClip _buttonClick;
[SerializeField]
private AudioClip _deny;
[SerializeField]
private AudioClip _coffeeMachine;
[SerializeField]
private AudioSource _audioSource;
@ -37,32 +43,26 @@ public class CoffeeMachine : MonoBehaviour
private IEnumerator CookCoffeeRoutine()
{
// TODO: Start blinking
Debug.Log("Blinky");
yield return new WaitForSeconds(2);
// SPiele kaffeemaschinen sound
Debug.Log("Brrrrr");
yield return new WaitForSeconds(0.5f);
yield return new WaitForSeconds(5);
_audioSource.PlayOneShot(_coffeeMachine);
yield return new WaitForSeconds(7);
CoffeePlace coffeePlace = _coffeePlaces.Where(c => c.IsFree()).ToList().GetRandomElement();
if (coffeePlace == null)
for (int i = 0; i < 2; i++)
{
// TODO: Spill coffee
Debug.Log("misty kaki");
}
else
{
Instantiate(_coffeItemPrefabs.GetRandomElement(), coffeePlace.transform.position, Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0));
}
CoffeePlace coffeePlace = _coffeePlaces.Where(c => c.IsFree()).ToList().GetRandomElement();
yield return new WaitForSeconds(1);
// todo: Play pling sound
if (coffeePlace == null)
{
// TODO: Spill coffee
Debug.Log("misty kaki");
}
else
{
Instantiate(_coffeItemPrefabs.GetRandomElement(), coffeePlace.transform.position, Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0));
}
}
_isCooking = false;
}