42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace DDD
|
|
{
|
|
public class RestaurantPlayerController : RestaurantFlowController
|
|
{
|
|
public override Task InitializeController()
|
|
{
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public override Task InitializeState()
|
|
{
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public override async Task OnReadyNewFlow(GameFlowState newFlowState)
|
|
{
|
|
if (newFlowState == GameFlowState.ReadyForRestaurant)
|
|
{
|
|
List<Task> tasks = new List<Task>();
|
|
// Spawn player job
|
|
CreateRestaurantPlayer createRestaurantPlayerJob = CreateInstance<CreateRestaurantPlayer>();
|
|
|
|
await createRestaurantPlayerJob.ReadyFlowTask();
|
|
await createRestaurantPlayerJob.RunFlowTask();
|
|
}
|
|
}
|
|
|
|
public override Task OnExitCurrentFlow(GameFlowState exitingFlowState)
|
|
{
|
|
if (exitingFlowState == GameFlowState.SettlementRestaurant)
|
|
{
|
|
// TODO : Remove player character
|
|
}
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
}
|