提交示例代码

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,14 @@
using Fantasy.Entitas.Interface;
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
namespace Fantasy;
public sealed class GateUnitDestroySystem : DestroySystem<GateUnit>
{
protected override void Destroy(GateUnit self)
{
// 移除缓存中的GateUnit
// 这里的销毁只能是通过EntityTimeoutComponent超时来触发的销毁不能通过直接调用Dispose来触发的销毁
GateUnitHelper.Remove(self.Scene, self.Id, false).Coroutine();
}
}