Beispiel #1
0
        public void Destroy()
        {
            Die();

            if (Fleet != null)
            {
                Fleet.Destroy();
                Fleet = null;
            }

            if (this.Connection != null)
            {
                try
                {
                    ((IDisposable)this.Connection).Dispose();
                }
                catch (Exception) { }
            }
            this.Connection = null;

            World.Actors.Remove(this);

            var worldPlayers = GetWorldPlayers(World);

            worldPlayers.Remove(this);
        }
Beispiel #2
0
        public void Destroy()
        {
            Die("");

            if (Fleet != null)
            {
                Fleet.Destroy();
                Fleet = null;
            }

            World.Actors.Remove(this);

            var worldPlayers = GetWorldPlayers(World);

            worldPlayers.Remove(this);
        }