This commit is contained in:
CortexCore
2023-11-15 23:55:06 +08:00
parent 5446067f91
commit 70247f0242
82 changed files with 3271 additions and 579 deletions

View File

@@ -15,8 +15,10 @@ namespace BITKit
bool IsEntered { get; set; }
void Entry();
UniTask EntryAsync();
void Entered();
void Exit();
UniTask ExitAsync();
void Exited();
}
[System.Serializable]
@@ -92,6 +94,7 @@ namespace BITKit
try
{
await currentElement.ExitAsync();
currentElement.Exited();
}
catch (OperationCanceledException)
{
@@ -107,6 +110,7 @@ namespace BITKit
try
{
await nextElement.EntryAsync();
nextElement.Entered();
}
catch (OperationCanceledException){}
OnEntry?.Invoke(nextElement);