示例#1
0
 private void ClearGameProgress()
 {
     currentLvl  = 0;
     currentGold = 0;
     unitCredits = null;
     currentBattleLogicController = null;
     currentBattleUiController    = null;
     waitingForBattleLevelLoad    = false;
 }
示例#2
0
        public void Initialize(BattleUIController battleUIController, Dictionary <UnitType, int> unitCredits)
        {
            currentUnitCredits = new Dictionary <UnitType, int>();
            currentUnitCredits[UnitType.FOOTMAN] = unitCredits[UnitType.FOOTMAN];
            currentUnitCredits[UnitType.HEALER]  = unitCredits[UnitType.HEALER];
            currentUnitCredits[UnitType.ARCHER]  = unitCredits[UnitType.ARCHER];

            this.battleUIController = battleUIController;
            ScanUnits();
        }
示例#3
0
        private void SetUpNewBattle()
        {
            BattleLogicController battleLogicController =
                Instantiate(battleLogicControllerPrefab).GetComponent <BattleLogicController>();
            BattleUIController battleUiController =
                Instantiate(battleUIControllerPrefab).GetComponent <BattleUIController>();

            currentBattleLogicController = battleLogicController;
            currentBattleUiController    = battleUiController;

            battleUiController.Initialize(currentBattleLogicController, unitCredits,
                                          levelConfigurations[currentLvl - 1]);
            battleLogicController.Initialize(currentBattleUiController, unitCredits);
            waitingForBattleLevelLoad = false;
        }