ProjectDDD/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantManagementUiEventSolver.cs

23 lines
789 B
C#
Raw Normal View History

using UnityEngine;
namespace DDD
{
public class RestaurantManagementUiEventSolver : MonoBehaviour, IInteractionSolver
{
public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject interactionPayloadSo = null)
{
2025-08-07 08:51:36 +00:00
if (CanExecuteInteraction() == false) return false;
var evt = GameEvents.OpenPopupUiEvent;
evt.UiType = typeof(RestaurantManagementUi);
EventBus.Broadcast(evt);
return true;
}
2025-08-07 08:51:36 +00:00
public bool CanExecuteInteraction()
{
GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState;
return currentGameFlowState == GameFlowState.ReadyForRestaurant;
}
}
}