refactor interact system
interact only after PopupItemMenu button clicked
This commit is contained in:
@@ -6,16 +6,14 @@ public class StoreContainer : BaseInteractableObject
|
||||
[SerializeField]
|
||||
private SellableItemSO _sellableItemSO;
|
||||
|
||||
public override void Interact(Player player)
|
||||
protected override void InteractAction()
|
||||
{
|
||||
base.Interact(player);
|
||||
if (player.IsHoldContainerItem())
|
||||
if (_player.IsHoldContainerItem())
|
||||
{
|
||||
var clone = Instantiate(_sellableItemSO);
|
||||
|
||||
var container = player.GetContainerItem();
|
||||
var container = _player.GetContainerItem();
|
||||
container.AddItem(clone);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user