21 lines
694 B
C#
21 lines
694 B
C#
![]() |
using UnityEngine;
|
||
|
|
||
|
namespace DDD
|
||
|
{
|
||
|
public class RestaurantOpenEventSolver : MonoBehaviour, IInteractionSolver
|
||
|
{
|
||
|
public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject interactionPayloadSo = null)
|
||
|
{
|
||
|
if (CanInteract() == false) return false;
|
||
|
|
||
|
GameFlowManager.Instance.ChangeFlow(GameFlowState.RunRestaurant);
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public bool CanInteract()
|
||
|
{
|
||
|
GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState;
|
||
|
return currentGameFlowState == GameFlowState.ReadyForRestaurant;
|
||
|
}
|
||
|
}
|
||
|
}
|