Player can hold shopping basket

This commit is contained in:
Vladimir Koshevarov
2023-03-05 13:37:50 +02:00
parent 5e4be5be1c
commit 905d159f4e
29 changed files with 2576 additions and 160 deletions
@@ -8,14 +8,14 @@ public class ColaFreezer : BaseInteractableObject
public override void Interact(Player player)
{
if (!player.HasFoodObject())
{
//player.BuyObject(_sellableItemSO);
// Spawn new object and set to player
var transform = Instantiate(_sellableItemSO.prefab, _playerArrivePoint);
var foodObject = transform.GetComponent<FoodObject>();
player.SetFoodObject(foodObject);
}
//if (!player.IsHoldContainer())
//{
// //player.BuyObject(_sellableItemSO);
// // Spawn new object and set to player
// var transform = Instantiate(_sellableItemSO.prefab, _playerArrivePoint);
// var foodObject = transform.GetComponent<FoodItem>();
// player.SetFoodObject(foodObject);
//}
}
}