/// <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); }
/// <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); }