Food in Ärsche schieben
This commit is contained in:
@ -2,6 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Data;
|
||||
using Interaction;
|
||||
using TMPro.Examples;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
@ -182,11 +183,32 @@ public class Character : MonoBehaviour
|
||||
{
|
||||
Debug.Log($"Gebe {_carriedInteractible.Name} an {developer.Name}");
|
||||
|
||||
Interactible item = _carriedInteractible;
|
||||
PickupInteractible item = _carriedInteractible;
|
||||
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
PickupItem(null);
|
||||
switch (item.ItemType)
|
||||
{
|
||||
case ItemType.Coffee:
|
||||
developer.GiveDrink(0.4, WantedConsumable.Drink);
|
||||
break;
|
||||
case ItemType.Mate:
|
||||
developer.GiveDrink(0.4, WantedConsumable.Mate);
|
||||
break;
|
||||
case ItemType.Pizza:
|
||||
developer.GiveFood(0.25, WantedConsumable.Pizza);
|
||||
break;
|
||||
}
|
||||
|
||||
item.UsesLeft--;
|
||||
|
||||
if (item.UsesLeft <= 0)
|
||||
{
|
||||
PickupItem(null);
|
||||
|
||||
Destroy(item.gameObject);
|
||||
Destroy(item.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public void SayItsImpossible()
|
||||
|
||||
Reference in New Issue
Block a user