Player put items in basket with UI indication
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user