2025-08-05 08:09:14 +00:00
|
|
|
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;
|
2025-08-07 04:12:02 +00:00
|
|
|
|
2025-08-05 08:09:14 +00:00
|
|
|
var evt = GameEvents.OpenPopupUiEvent;
|
|
|
|
evt.UiType = typeof(RestaurantManagementUi);
|
|
|
|
EventBus.Broadcast(evt);
|
|
|
|
return true;
|
|
|
|
}
|
2025-08-07 04:12:02 +00:00
|
|
|
|
2025-08-07 08:51:36 +00:00
|
|
|
public bool CanExecuteInteraction()
|
2025-08-07 04:12:02 +00:00
|
|
|
{
|
|
|
|
GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState;
|
|
|
|
return currentGameFlowState == GameFlowState.ReadyForRestaurant;
|
|
|
|
}
|
2025-08-05 08:09:14 +00:00
|
|
|
}
|
|
|
|
}
|