2025-08-14 11:35:16 +00:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace DDD
|
|
|
|
{
|
2025-08-17 12:54:46 +00:00
|
|
|
public class RestaurantRunController : FlowController
|
2025-08-14 11:35:16 +00:00
|
|
|
{
|
|
|
|
RestaurantCustomerStateSo _restaurantCustomerStateSo;
|
2025-08-14 11:59:40 +00:00
|
|
|
public override Task InitializeController()
|
2025-08-14 11:35:16 +00:00
|
|
|
{
|
2025-08-14 11:59:40 +00:00
|
|
|
return Task.CompletedTask;
|
|
|
|
|
2025-08-14 11:35:16 +00:00
|
|
|
}
|
|
|
|
|
2025-08-14 11:59:40 +00:00
|
|
|
public override Task InitializeState()
|
2025-08-14 11:35:16 +00:00
|
|
|
{
|
2025-08-14 11:59:40 +00:00
|
|
|
return Task.CompletedTask;
|
|
|
|
|
2025-08-14 11:35:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public override async Task OnReadyNewFlow(GameFlowState newFlowState)
|
|
|
|
{
|
|
|
|
var restaurantCustomerStateHandle = _restaurantCustomerStateSo.OnReadyNewFlow(newFlowState);
|
2025-08-14 11:59:40 +00:00
|
|
|
await Task.WhenAll(restaurantCustomerStateHandle);
|
2025-08-14 11:35:16 +00:00
|
|
|
}
|
|
|
|
public override async Task OnExitCurrentFlow(GameFlowState exitingFlowState)
|
|
|
|
{
|
|
|
|
if (exitingFlowState == GameFlowState.RunRestaurant)
|
|
|
|
{
|
|
|
|
var restaurantCustomerStateHandle = _restaurantCustomerStateSo.OnExitCurrentFlow(exitingFlowState);
|
|
|
|
await Task.WhenAll(restaurantCustomerStateHandle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|