public void Cleanup() { LogicLayer.RemoveClientFromAll(this); //persist player DataLayer.UpdateGalaxyPlayer(Player); if (GalaxyTcpClient != null) { GalaxyTcpClient.Close(); } if (GalaxyUdpClient != null) { GalaxyUdpClient.Close(); } }