Player put items in basket with UI indication

This commit is contained in:
Vladimir Koshevarov
2023-03-05 17:21:00 +02:00
parent d7d0d8754b
commit 901e500d0e
21 changed files with 1223 additions and 618 deletions
@@ -0,0 +1,20 @@
using UnityEngine;
public class StoreContainer : BaseInteractableObject
{
[SerializeField]
private SellableItemSO _sellableItemSO;
public override void Interact(Player player)
{
if (player.IsHoldContainerItem())
{
var clone = Instantiate(_sellableItemSO);
var container = player.GetContainerItem();
container.AddItem(clone);
}
}
}