radial menu work
This commit is contained in:
@@ -4,21 +4,22 @@ public class ShopingContainer : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private ContainerSO _containerSO;
|
||||
[SerializeField]
|
||||
//private ItemActionsUI _actionsMenu;
|
||||
|
||||
protected override void InteractAction()
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
if (!_player.IsHoldContainerItem())
|
||||
_menuActions[RadialMenuActions.Take].IsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
var transform = Instantiate(_containerSO.prefab, _interactionPoint);
|
||||
var containerItem = transform.GetComponent<ContainerItem>();
|
||||
if (containerItem == null)
|
||||
{
|
||||
var transform = Instantiate(_containerSO.prefab, _interactionPoint);
|
||||
var containerItem = transform.GetComponent<ContainerItem>();
|
||||
if (containerItem == null)
|
||||
{
|
||||
Debug.LogError("Container Item is null");
|
||||
return;
|
||||
}
|
||||
_player.SetContainerItem(containerItem);
|
||||
Debug.LogError("Container Item is null");
|
||||
return;
|
||||
}
|
||||
_player.SetContainerItem(containerItem);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user