Files
Fishing2Server/Hotfix/Gate/System/GateUnitSessionComponentSystem.cs
2025-08-07 09:16:23 +08:00

17 lines
473 B
C#

using Fantasy.Entitas.Interface;
namespace NB.Gate;
public class GateUnitSessionComponentSystem : DestroySystem<GateUnitSessionComponent>
{
protected override void Destroy(GateUnitSessionComponent self)
{
var gateUnitManageComponent = self.Scene.GetComponent<GateUnitManageComponent>();
if (gateUnitManageComponent != null)
{
_ = gateUnitManageComponent.Remove(self.AccountID);
}
self.AccountID = 0;
}
}