提交示例代码
This commit is contained in:
14
聊天系统课程代码/Server/Hotfix/Gate/System/GateUnitSystem.cs
Normal file
14
聊天系统课程代码/Server/Hotfix/Gate/System/GateUnitSystem.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user