Ejemplo n.º 1
0
 /// <summary>
 /// Initializes the object and all control elements of the game.
 /// </summary>
 private GameObjectManager()
 {
     teamMgr = new TeamManager();
     fightMgr = new FightManager();
     objectCreator = new ObjectCreator();
     moveMgr = new MoveManager();
     groupMgr = new GroupManager();
     propertyMgr = new PropertyManager();
     hitTest = new HitTest();
     solarSystemMgr = new SolarSystemManager();
     gameSerializer = new GameSerializer();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Destroys the current game (mission) and sets a new empty control elements of the game.
        /// </summary>
        public void DestroyGame()
        {
            // Destroys targeted group (destroys pointers).
            groupMgr.UntargetGroup();

            // Destroys all object in the game.
            foreach (var item in objectCreator.GetInicializedSolarSystems()) {
                item.Destroy();
            }

            // Creates a new empty control elements of the game.
            teamMgr = new TeamManager();
            fightMgr = new FightManager();
            objectCreator = new ObjectCreator();
            moveMgr = new MoveManager();
            groupMgr = new GroupManager();
            propertyMgr = new PropertyManager();
            hitTest = new HitTest();
            solarSystemMgr = new SolarSystemManager();
        }