Beispiel #1
0
        /// <summary>
        /// Destroys the SolarSystem and all its members.
        /// </summary>
        public void Destroy()
        {
            if (sun != null)
            {
                sun.Destroy();
            }

            foreach (var isgoPair in isgoObjectDict)
            {
                isgoPair.Value.Destroy();
            }
            foreach (var imgoPair in imgoObjectDict)
            {
                imgoPair.Value.Destroy();
            }
            foreach (var bullet in bulletDict)
            {
                bullet.Value.Destroy();
            }
        }
 /// <summary>
 /// Removes static game object from group, from solar system and calls Destroy to remove object from the game.
 /// </summary>
 /// <param Name="isgo">IStaticGameObject to remove from the game.</param>
 public void DestroyGameObject(IStaticGameObject isgo)
 {
     RemoveFromGroup(isgo);
     isgo.Destroy();
     Game.SolarSystemManager.RemoveObjectFromSolarSystem(isgo);
 }
Beispiel #3
0
 /// <summary>
 /// Removes the static game object from group, from a solar system and calls Destroy to remove object from the game.
 /// </summary>
 /// <param Name="isgo">IStaticGameObject to remove from the game.</param>
 public void DestroyGameObject(IStaticGameObject isgo)
 {
     RemoveFromGroup(isgo);
     isgo.Destroy();
     Game.SolarSystemManager.RemoveObjectFromSolarSystem(isgo);
 }