2025-08-14 11:35:16 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace DDD
|
|
|
|
{
|
2025-08-17 12:54:46 +00:00
|
|
|
public class RestaurantPlayerController : FlowController
|
2025-08-14 11:35:16 +00:00
|
|
|
{
|
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)
|
|
|
|
{
|
|
|
|
if (newFlowState == GameFlowState.ReadyForRestaurant)
|
|
|
|
{
|
|
|
|
List<Task> tasks = new List<Task>();
|
|
|
|
// Spawn player job
|
2025-08-14 11:59:40 +00:00
|
|
|
CreateRestaurantPlayer createRestaurantPlayerJob = CreateInstance<CreateRestaurantPlayer>();
|
2025-08-14 11:35:16 +00:00
|
|
|
|
2025-08-14 11:59:40 +00:00
|
|
|
await createRestaurantPlayerJob.ReadyFlowTask();
|
|
|
|
await createRestaurantPlayerJob.RunFlowTask();
|
2025-08-14 11:35:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-08-14 11:59:40 +00:00
|
|
|
public override Task OnExitCurrentFlow(GameFlowState exitingFlowState)
|
2025-08-14 11:35:16 +00:00
|
|
|
{
|
|
|
|
if (exitingFlowState == GameFlowState.SettlementRestaurant)
|
|
|
|
{
|
|
|
|
// TODO : Remove player character
|
|
|
|
}
|
2025-08-14 11:59:40 +00:00
|
|
|
return Task.CompletedTask;
|
2025-08-14 11:35:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|