27 lines
679 B
C#
27 lines
679 B
C#
using UnityEngine;
|
|
|
|
public class ShopingBasket : BaseInteractableObject
|
|
{
|
|
[SerializeField]
|
|
private ContainerSO _containerSO;
|
|
[SerializeField]
|
|
private ItemActionsUI _actionsMenu;
|
|
|
|
public override void Interact(Player player)
|
|
{
|
|
if (!player.IsHoldContainerItem())
|
|
{
|
|
var transform = Instantiate(_containerSO.prefab, _playerArrivePoint);
|
|
var containerItem = transform.GetComponent<ContainerItem>();
|
|
if (containerItem == null)
|
|
{
|
|
Debug.LogError("Container Item is null");
|
|
return;
|
|
}
|
|
player.SetContainerItem(containerItem);
|
|
}
|
|
}
|
|
|
|
|
|
}
|