ProjectDDD/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantManagementUiEventSolver.cs
2025-08-07 17:51:36 +09:00

23 lines
789 B
C#

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