change multiple scene system to dynamic indoor scene
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class ShopingContainer : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private ContainerSO _containerSO;
|
||||
|
||||
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)
|
||||
{
|
||||
Debug.LogError("Container Item is null");
|
||||
return;
|
||||
}
|
||||
_player.SetContainerItem(containerItem);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user