added new models

This commit is contained in:
2023-03-03 09:30:17 +02:00
parent f5733d0ffd
commit 5e4be5be1c
57 changed files with 2212 additions and 42 deletions
@@ -4,15 +4,15 @@ using UnityEngine;
public class ColaFreezer : BaseInteractableObject
{
[SerializeField]
private FoodObjectSO _foodObjectSO;
private SellableItemSO _sellableItemSO;
public override void Interact(Player player)
{
if (!player.HasFoodObject())
{
player.BuyObject(_foodObjectSO);
//player.BuyObject(_sellableItemSO);
// Spawn new object and set to player
var transform = Instantiate(_foodObjectSO.prefab, _playerArrivePoint);
var transform = Instantiate(_sellableItemSO.prefab, _playerArrivePoint);
var foodObject = transform.GetComponent<FoodObject>();
player.SetFoodObject(foodObject);
}