1774ab5b18
interact only after PopupItemMenu button clicked
25 lines
679 B
C#
25 lines
679 B
C#
using UnityEngine;
|
|
|
|
public class ShopingContainer : BaseInteractableObject
|
|
{
|
|
[SerializeField]
|
|
private ContainerSO _containerSO;
|
|
[SerializeField]
|
|
//private ItemActionsUI _actionsMenu;
|
|
|
|
protected override void InteractAction()
|
|
{
|
|
if (!_player.IsHoldContainerItem())
|
|
{
|
|
var transform = Instantiate(_containerSO.prefab, _interactionPoint);
|
|
var containerItem = transform.GetComponent<ContainerItem>();
|
|
if (containerItem == null)
|
|
{
|
|
Debug.LogError("Container Item is null");
|
|
return;
|
|
}
|
|
_player.SetContainerItem(containerItem);
|
|
}
|
|
}
|
|
}
|