EndCurrentFlow 추가
This commit is contained in:
parent
e22f2d6857
commit
7aad5a3d2c
@ -47,7 +47,7 @@ public void ChangeFlow(GameFlowState newFlowState)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EndCurrentFlow();
|
_ = EndCurrentFlow();
|
||||||
|
|
||||||
_ = ReadyNewFlow(newFlowState);
|
_ = ReadyNewFlow(newFlowState);
|
||||||
}
|
}
|
||||||
@ -57,9 +57,14 @@ private bool CanChangeFlow(GameFlowState newFlowState)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EndCurrentFlow()
|
private async Task EndCurrentFlow()
|
||||||
{
|
{
|
||||||
|
var endCurrentFlowState = GameFlowDataSo.CurrentGameState;
|
||||||
|
|
||||||
|
foreach (var handler in FlowHandlers)
|
||||||
|
{
|
||||||
|
await handler.OnExitCurrentFlow(endCurrentFlowState);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ReadyNewFlow(GameFlowState newFlowState)
|
private async Task ReadyNewFlow(GameFlowState newFlowState)
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
// using System.Threading.Tasks;
|
|
||||||
// using UnityEngine;
|
|
||||||
//
|
|
||||||
// namespace DDD
|
|
||||||
// {
|
|
||||||
// public abstract class GameFlowTask : ScriptableObject
|
|
||||||
// {
|
|
||||||
// public abstract Task OnReadyNewFlow(GameFlowState newFlowState);
|
|
||||||
// public abstract Task OnExitCurrentFlow(GameFlowState exitingFlowState);
|
|
||||||
// }
|
|
||||||
// }
|
|
@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b072e73316b7d534b8ec18ffa0b8bfa2
|
|
Loading…
Reference in New Issue
Block a user