17 lines
473 B
C#
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;
|
|
}
|
|
} |