refactor interact system
interact only after PopupItemMenu button clicked
This commit is contained in:
@@ -7,10 +7,9 @@ public class ShopingContainer : BaseInteractableObject
|
||||
[SerializeField]
|
||||
//private ItemActionsUI _actionsMenu;
|
||||
|
||||
public override void Interact(Player player)
|
||||
protected override void InteractAction()
|
||||
{
|
||||
base.Interact(player);
|
||||
if (!player.IsHoldContainerItem())
|
||||
if (!_player.IsHoldContainerItem())
|
||||
{
|
||||
var transform = Instantiate(_containerSO.prefab, _interactionPoint);
|
||||
var containerItem = transform.GetComponent<ContainerItem>();
|
||||
@@ -19,9 +18,7 @@ public class ShopingContainer : BaseInteractableObject
|
||||
Debug.LogError("Container Item is null");
|
||||
return;
|
||||
}
|
||||
player.SetContainerItem(containerItem);
|
||||
_player.SetContainerItem(containerItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user