1774ab5b18
interact only after PopupItemMenu button clicked
20 lines
413 B
C#
20 lines
413 B
C#
|
|
using UnityEngine;
|
|
|
|
public class StoreContainer : BaseInteractableObject
|
|
{
|
|
[SerializeField]
|
|
private SellableItemSO _sellableItemSO;
|
|
|
|
protected override void InteractAction()
|
|
{
|
|
if (_player.IsHoldContainerItem())
|
|
{
|
|
var clone = Instantiate(_sellableItemSO);
|
|
|
|
var container = _player.GetContainerItem();
|
|
container.AddItem(clone);
|
|
}
|
|
}
|
|
}
|