chat
This commit is contained in:
17
Hotfix/Gate/System/GateUnitSessionComponentSystem.cs
Normal file
17
Hotfix/Gate/System/GateUnitSessionComponentSystem.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user