Exemplo n.º 1
0
        public BarbarianTribeBattlePassiveAction(uint barbarianTribeId,
                                                 ILocker locker,
                                                 IGameObjectLocator gameObjectLocator,
                                                 IDbManager dbManager,
                                                 Formula formula,
                                                 BarbarianTribeBattleProcedure barbarianTribeBattleProcedure,
                                                 IWorld world,
                                                 ISimpleStubGeneratorFactory simpleStubGeneratorFactory)
            : this(locker, gameObjectLocator, dbManager, formula, barbarianTribeBattleProcedure, world, simpleStubGeneratorFactory)
        {
            this.barbarianTribeId              = barbarianTribeId;
            this.locker                        = locker;
            this.gameObjectLocator             = gameObjectLocator;
            this.dbManager                     = dbManager;
            this.formula                       = formula;
            this.barbarianTribeBattleProcedure = barbarianTribeBattleProcedure;
            this.world = world;

            IBarbarianTribe barbarianTribe;

            if (!gameObjectLocator.TryGetObjects(barbarianTribeId, out barbarianTribe))
            {
                throw new Exception("Did not find barb tribe that was supposed to be having a battle");
            }

            simpleStubGenerator = simpleStubGeneratorFactory.CreateSimpleStubGenerator(formula.BarbarianTribeUnitRatios(), formula.BarbarianTribeUnitTypes());
        }
Exemplo n.º 2
0
        public BarbarianTribeBattlePassiveAction(ILocker locker,
                                                 IGameObjectLocator gameObjectLocator,
                                                 IDbManager dbManager,
                                                 Formula formula,
                                                 BarbarianTribeBattleProcedure barbarianTribeBattleProcedure,
                                                 IWorld world,
                                                 ISimpleStubGeneratorFactory simpleStubGeneratorFactory)
        {
            this.locker                        = locker;
            this.gameObjectLocator             = gameObjectLocator;
            this.dbManager                     = dbManager;
            this.formula                       = formula;
            this.barbarianTribeBattleProcedure = barbarianTribeBattleProcedure;
            this.world = world;

            simpleStubGenerator = simpleStubGeneratorFactory.CreateSimpleStubGenerator(formula.BarbarianTribeUnitRatios(), formula.BarbarianTribeUnitTypes());
        }