提交示例代码

This commit is contained in:
Bob.Song
2026-03-05 11:39:06 +08:00
commit 25958f58c3
2534 changed files with 209593 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using Fantasy.Async;
using Fantasy.Entitas.Interface;
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
namespace Fantasy;
public sealed class GateAccountFlagComponentSystem : DestroySystem<GateAccountFlagComponent>
{
protected override void Destroy(GateAccountFlagComponent self)
{
// DestroyAsync(self).Coroutine();
var selfAccount = self.Account;
if (selfAccount == null)
{
return;
}
var selfAccountMailRouteId = selfAccount.MailRouteId;
GateLoginHelper.Offline(self.Scene, selfAccountMailRouteId).Coroutine();
self.Account = null;
selfAccount.Dispose();
}
// private async FTask DestroyAsync(GateAccountFlagComponent self)
// {
// var selfAccount = self.Account;
// if (selfAccount == null)
// {
// return;
// }
// await GateLoginHelper.Offline(self.Scene,selfAccount.MailRouteId)
// self.Account = null;
// selfAccount.Dispose();
// }
}