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