| 12345678910111213141516171819202122232425262728293031 | namespace ET{	public class SessionComponentDestroySystem: DestroySystem<SessionComponent>	{		public override void Destroy(SessionComponent self)		{			self.AccountSession?.Dispose();			self.AccountSession = null;			self.GateSession?.Dispose();			self.GateSession = null;		}	}	public static class SessionComponentComponent    {		public static void DisconnectAccount(this SessionComponent self)		{			self.AccountSession?.GetComponent<DisConnectedCompnent>()?.CancelAlert();			self.AccountSession?.Dispose();			self.AccountSession = null;		}		public static void Disconnect(this SessionComponent self)		{			self.DisconnectAccount();			self.GateSession?.GetComponent<DisConnectedCompnent>()?.CancelAlert();			self.GateSession?.Dispose();			self.GateSession = null;		}    }}
 |