Exemple #1
0
    void Start()
    {
        UnitsStats setUpStats    = UnitsStats.CreateUnitsStats();
        Army       attackingArmy = Army.CreateMyArmy();

        attackingArmy.Start();
        attackingArmy.addUnitToArmy(Unit.CreateMyUnit().SetParams((int)UnitType.Swordsman, ""));
        attackingArmy.addUnitToArmy(Unit.CreateMyUnit().SetParams((int)UnitType.Swordsman, ""));
        Army defendingArmy = Army.CreateMyArmy();

        defendingArmy.Start();
        defendingArmy.addUnitToArmy(Unit.CreateMyUnit().SetParams((int)UnitType.Swordsman, ""));
        defendingArmy.addUnitToArmy(Unit.CreateMyUnit().SetParams((int)UnitType.Archer, ""));
        _cm = CombatManager.CreateMyCM(attackingArmy, defendingArmy);
        _cm.ConductBattle();


        GenerateMap();
    }