Beispiel #1
0
        public GameManager(ITextService textService, IMenuActionService menuActionService, ICreatureService creatureService)
        {
            this._menuActionService = menuActionService;
            this._textService       = textService;

            _instructionsManager = new InstructionsManager(menuActionService, textService);
            _fightManager        = new FightManager(textService, creatureService);
        }
 /// <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();
 }
Beispiel #3
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();
 }
Beispiel #4
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();
        }
Beispiel #5
0
 public ProxyFightManager(IFightManager fightManager)
 {
     this._fightManager = fightManager;
 }
        /// <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();
        }