// Campaign Mode
        public void SetupPlayerCommander(BaseTravellerData troopsInformations, bool isAttacker = true)
        {
            BattlefieldCommander currentCommander = new BattlefieldCommander();

            currentCommander.unitsCarried    = new List <TroopsInformation>();
            currentCommander.teamAffiliation = Maps.TerritoryOwners.Player;

            currentCommander.heroesCarried = new List <BaseHeroInformationData>();
            currentCommander.heroesCarried.AddRange(troopsInformations.leaderUnit);

            for (int i = 0; i < troopsInformations.troopsCarried.Count; i++)
            {
                currentCommander.unitsCarried.Add(troopsInformations.troopsCarried[i]);
            }

            currentCommander = ImplementTechnology(currentCommander);

            currentCommander.spawnBuffsList = new List <BaseBuffInformationData>();
            currentCommander.spawnBuffsList.AddRange(CheckCampaignPlayerBuffPenalties());

            if (isAttacker)
            {
                attackingCommander = new BattlefieldCommander();
                attackingCommander = currentCommander;
            }
            else
            {
                defendingCommander = new BattlefieldCommander();
                defendingCommander = currentCommander;
            }
        }
        public void SetUnitPanels(BattlefieldCommander attacker, BattlefieldCommander defender)
        {
            attackerReportPanel.AssignCommander(attacker);
            defenderReportPanel.AssignCommander(defender);

            attackerPanel.warChestCount.SetTargetCount(attacker.resourceAmount);
            defenderPanel.warChestCount.SetTargetCount(defender.resourceAmount);

            attackerPanel.SetCurrentCommander(attacker);
            defenderPanel.SetCurrentCommander(defender);

            for (int i = 0; i < attackerPanel.unitList.Count; i++)
            {
                if (i < attacker.unitsCarried.Count)
                {
                    attackerPanel.unitList[i].currentMaxCooldown = attacker.unitsCarried[i].unitInformation.unitCooldown;
                    attacker.unitsCarried[i].totalUnitsAvailableForDeployment = attacker.unitsCarried[i].totalUnitCount;
                    attackerPanel.unitList[i].countText.text   = attacker.unitsCarried[i].totalUnitCount.ToString();
                    attackerPanel.unitList[i].unitImage.sprite = BattlefieldSpawnManager.GetInstance.unitStorage.GetUnitIcon(attacker.unitsCarried[i].unitInformation.unitName);
                    if (attacker.unitsCarried[i].totalUnitCount <= 0)
                    {
                        attackerPanel.unitList[i].DisablePanel();
                    }
                    else
                    {
                        attackerPanel.unitList[i].EnablePanel();
                    }
                }
                else
                {
                    attackerPanel.unitList[i].SetAsUnknown();
                }
            }

            for (int i = 0; i < defenderPanel.unitList.Count; i++)
            {
                if (i < defender.unitsCarried.Count)
                {
                    defenderPanel.unitList[i].currentMaxCooldown = defender.unitsCarried[i].unitInformation.unitCooldown;
                    defender.unitsCarried[i].totalUnitsAvailableForDeployment = defender.unitsCarried[i].totalUnitCount;
                    defenderPanel.unitList[i].countText.text   = defender.unitsCarried[i].totalUnitCount.ToString();
                    defenderPanel.unitList[i].unitImage.sprite = BattlefieldSpawnManager.GetInstance.unitStorage.GetUnitIcon(defender.unitsCarried[i].unitInformation.unitName);

                    if (defender.unitsCarried[i].totalUnitCount <= 0)
                    {
                        defenderPanel.unitList[i].DisablePanel();
                    }
                    else
                    {
                        defenderPanel.unitList[i].EnablePanel();
                    }
                }
                else
                {
                    defenderPanel.unitList[i].SetAsUnknown();
                }
            }

            UpdateUnitPanels();
        }
        public void HealUnitForThisCommander(TeamType thisTeam, int unitIdx)
        {
            BattlefieldCommander thisCommander = null;

            switch (thisTeam)
            {
            case TeamType.Defender:
                thisCommander = defendingCommander;
                break;

            case TeamType.Attacker:
                thisCommander = attackingCommander;
                break;

            case TeamType.Neutral:
            default:
                break;
            }

            if (thisCommander.resourceAmount >= thisCommander.unitsCarried[unitIdx].unitInformation.healcost)
            {
                if (thisCommander.unitsCarried[unitIdx].totalInjuredCount > 0)
                {
                    thisCommander.resourceAmount -= thisCommander.unitsCarried[unitIdx].unitInformation.healcost;

                    thisCommander.unitsCarried[unitIdx].totalInjuredCount -= 1;
                    thisCommander.unitsCarried[unitIdx].totalUnitCount    += 1;
                    thisCommander.unitsCarried[unitIdx].totalUnitsAvailableForDeployment += 1;
                    BattlefieldSystemsManager.GetInstance.IncreaseVictoryPoints(thisTeam);
                }
            }
        }
Ejemplo n.º 4
0
    public void ObtaincoinRewards()
    {
        BattlefieldCommander enemyUnits  = new BattlefieldCommander();
        BattlefieldCommander playerUnits = new BattlefieldCommander();

        if (TransitionManager.GetInstance.isPlayerAttacker)
        {
            enemyUnits  = BattlefieldSpawnManager.GetInstance.defendingCommander;
            playerUnits = BattlefieldSpawnManager.GetInstance.attackingCommander;
        }
        else
        {
            enemyUnits  = BattlefieldSpawnManager.GetInstance.attackingCommander;
            playerUnits = BattlefieldSpawnManager.GetInstance.defendingCommander;
        }


        coinRewards = new List <ResourceReward>();
        // Obtain Salvaged Prize
        int salvagedCoins = 0;

        for (int i = 0; i < enemyUnits.unitsCarried.Count; i++)
        {
            salvagedCoins += enemyUnits.CheckUnitDeathCount(enemyUnits.unitsCarried[i].unitInformation.unitName);
        }
        salvagedCoins += playerUnits.CheckTotalDeadTroopsCount();
        salvagedCoins *= UnityEngine.Random.Range(0, 3);


        // Obtain Injured Prize
        int deadCount = playerUnits.CheckTotalDeadTroopsCount();

        ResourceReward deadPenalty = new ResourceReward();

        deadPenalty.resourceTitle = "Dead Penalty";
        deadPenalty.resourceType  = ResourceType.Coin;
        deadPenalty.rewardAmount  = -deadCount;

        ResourceReward salvagedPrize = new ResourceReward();

        salvagedPrize.resourceTitle = "Salvaged Prize";
        salvagedPrize.resourceType  = ResourceType.Coin;
        salvagedPrize.rewardAmount  = salvagedCoins;

        coinRewards.Add(salvagedPrize);
        coinRewards.Add(deadPenalty);

        if (PlayerGameManager.GetInstance != null)
        {
            for (int i = 0; i < coinRewards.Count; i++)
            {
                PlayerGameManager.GetInstance.ReceiveResource(coinRewards[i].rewardAmount, coinRewards[i].resourceType);
            }
            SaveLoadManager.GetInstance.SaveCurrentData();
        }
    }
Ejemplo n.º 5
0
    public void ReturnUnitsToEnemyData()
    {
        BattlefieldCommander enemyUnits = new BattlefieldCommander();

        if (TransitionManager.GetInstance.isPlayerAttacker)
        {
            enemyUnits = BattlefieldSpawnManager.GetInstance.defendingCommander;
        }
        else
        {
            enemyUnits = BattlefieldSpawnManager.GetInstance.attackingCommander;
        }


        if (TransitionManager.GetInstance.isEngagedWithTraveller)
        {
            if (!playerWon)
            {
                TransitionManager.GetInstance.attackedTravellerData.troopsCarried = new List <TroopsInformation>();
                TransitionManager.GetInstance.attackedTravellerData.troopsCarried.AddRange(enemyUnits.unitsCarried);
            }
            else
            {
                PlayerGameManager.GetInstance.campaignData.travellerList.Remove(TransitionManager.GetInstance.attackedTravellerData);
            }
        }
        else if (TransitionManager.GetInstance.isEngagedWithMapPoint)
        {
            enemyTerritoryName = TransitionManager.GetInstance.attackedPointInformationData.ownedBy;

            Debug.Log("[Victory While Engaged Against a Map Point]");
            if (!playerWon)
            {
                Debug.Log("[Map Point Still Has Troops Around: " + enemyUnits.CheckTotalTroopsCount() + "]");
                TransitionManager.GetInstance.attackedPointInformationData.troopsStationed = new List <TroopsInformation>();
                TransitionManager.GetInstance.attackedPointInformationData.troopsStationed.AddRange(enemyUnits.unitsCarried);

                TerritoryOwners pastOwner = TransitionManager.GetInstance.attackedPointInformationData.ownedBy;
                TransitionManager.GetInstance.attackedPointInformationData.previousOwner = pastOwner;
                TransitionManager.GetInstance.attackedPointInformationData.ownedBy       = enemyUnits.teamAffiliation;
            }
            else
            {
                TransitionManager.GetInstance.attackedPointInformationData.troopsStationed = new List <TroopsInformation>();

                TerritoryOwners pastOwner = TransitionManager.GetInstance.attackedPointInformationData.ownedBy;
                TransitionManager.GetInstance.attackedPointInformationData.previousOwner = pastOwner;

                TransitionManager.GetInstance.attackedPointInformationData.ownedBy = Maps.TerritoryOwners.Player;
            }
        }

        SaveLoadManager.GetInstance.SaveCurrentCampaignData();
    }
        public void UpdateUnitPanels()
        {
            if (BattlefieldSpawnManager.GetInstance == null)
            {
                return;
            }

            BattlefieldCommander attacker = BattlefieldSpawnManager.GetInstance.attackingCommander;
            BattlefieldCommander defender = BattlefieldSpawnManager.GetInstance.defendingCommander;

            attackerPanel.warChestCount.SetTargetCount(attacker.resourceAmount);
            attackerPanel.warChestCount.startUpdating = true;
            defenderPanel.warChestCount.SetTargetCount(defender.resourceAmount);
            defenderPanel.warChestCount.startUpdating = true;

            for (int i = 0; i < attackerPanel.unitList.Count; i++)
            {
                if (i < attacker.unitsCarried.Count)
                {
                    attackerPanel.unitList[i].currentMaxCooldown = attacker.unitsCarried[i].unitInformation.unitCooldown;
                    attackerPanel.unitList[i].countText.text     = attacker.unitsCarried[i].totalUnitsAvailableForDeployment.ToString();

                    if (attacker.unitsCarried[i].totalUnitsAvailableForDeployment <= 0)
                    {
                        attackerPanel.unitList[i].DisablePanel();
                    }
                    else
                    {
                        attackerPanel.unitList[i].EnablePanel();
                    }
                }
            }

            for (int i = 0; i < defenderPanel.unitList.Count; i++)
            {
                if (i < defender.unitsCarried.Count)
                {
                    defenderPanel.unitList[i].currentMaxCooldown = defender.unitsCarried[i].unitInformation.unitCooldown;
                    defenderPanel.unitList[i].countText.text     = defender.unitsCarried[i].totalUnitsAvailableForDeployment.ToString();

                    if (defender.unitsCarried[i].totalUnitsAvailableForDeployment <= 0)
                    {
                        defenderPanel.unitList[i].DisablePanel();
                    }
                    else
                    {
                        defenderPanel.unitList[i].EnablePanel();
                    }
                }
            }
        }
Ejemplo n.º 7
0
        public void SetCurrentCommander(BattlefieldCommander thisCommander)
        {
            currentCommander = thisCommander;

            for (int i = 0; i < unitList.Count; i++)
            {
                unitList[i].ResetCooldown();
            }

            if (isComputer)
            {
                computerAI.commanderInformation = currentCommander;
            }
        }
    public static BattlefieldCommander ConvertTravellerToCommander(BaseTravellerData thisTraveller)
    {
        BattlefieldCommander tmp = new BattlefieldCommander();

        tmp.heroesCarried = new List <BaseHeroInformationData>();

        tmp.unitsCarried = new List <TroopsInformation>();
        tmp.unitsCarried.AddRange(thisTraveller.troopsCarried);
        tmp.unitMindset = thisTraveller.leaderMindset;
        if (thisTraveller.leaderUnit != null)
        {
            tmp.heroesCarried.AddRange(thisTraveller.leaderUnit);
        }

        return(tmp);
    }
Ejemplo n.º 9
0
        public BattlefieldCommander ObtainCampaignMapPointEnemyCommander()
        {
            BattlefieldCommander     enemyCommander            = new BattlefieldCommander();
            List <BaseTravellerData> enemyOnPointTravellerList = new List <BaseTravellerData>();

            enemyOnPointTravellerList.AddRange(TransitionManager.GetInstance.attackedPointInformationData.travellersOnPoint.FindAll(x => x.relationship < 0));
            enemyCommander.teamAffiliation = TransitionManager.GetInstance.attackedPointInformationData.ownedBy;

            // CONVERT ALL HATEFUL UNITS IN THE POINT TO 1 TRAVELLER
            BaseTravellerData enemyTravellers = new BaseTravellerData();

            enemyTravellers.troopsCarried = new List <TroopsInformation>();
            enemyTravellers.leaderUnit    = new List <BaseHeroInformationData>();
            if (enemyOnPointTravellerList.Count > 0)
            {
                for (int i = 0; i < enemyOnPointTravellerList.Count; i++)
                {
                    enemyTravellers.leaderUnit.AddRange(enemyOnPointTravellerList[i].leaderUnit);

                    for (int x = 0; x < enemyOnPointTravellerList[i].troopsCarried.Count; x++)
                    {
                        if (enemyTravellers.troopsCarried.Count > 0)
                        {
                            int idx = -1;
                            idx = enemyTravellers.troopsCarried.FindIndex(y => y.unitInformation.unitName == enemyOnPointTravellerList[i].troopsCarried[i].unitInformation.unitName);
                            if (idx != -1)
                            {
                                enemyTravellers.troopsCarried[idx].totalUnitCount += enemyOnPointTravellerList[i].troopsCarried[i].totalUnitCount;
                            }
                            else
                            {
                                enemyTravellers.troopsCarried.Add(enemyOnPointTravellerList[i].troopsCarried[i]);
                            }
                        }
                        else
                        {
                            enemyTravellers.troopsCarried.Add(enemyOnPointTravellerList[i].troopsCarried[i]);
                        }
                    }
                }
            }
            enemyCommander = BattlefieldCommander.ConvertTravellerToCommander(enemyTravellers);

            return(enemyCommander);
        }
        public BattlefieldCommander ImplementTechnology(BattlefieldCommander commander)
        {
            for (int i = 0; i < commander.unitsCarried.Count; i++)
            {
                // DAMAGE
                commander.unitsCarried[i].unitInformation.minDamage += PlayerGameManager.GetInstance.troopBehavior.techDmg;
                commander.unitsCarried[i].unitInformation.maxDamage += PlayerGameManager.GetInstance.troopBehavior.techDmg;

                // HEALTH
                commander.unitsCarried[i].unitInformation.curhealth += PlayerGameManager.GetInstance.troopBehavior.techHealth;
                commander.unitsCarried[i].unitInformation.maxHealth += PlayerGameManager.GetInstance.troopBehavior.techHealth;

                // MORALE
                commander.unitsCarried[i].unitInformation.morale = PlayerGameManager.GetInstance.troopBehavior.baseMorale +
                                                                   PlayerGameManager.GetInstance.troopBehavior.techMorale;
            }

            return(commander);
        }
Ejemplo n.º 11
0
    public void ReturnUnitsToPlayerData()
    {
        BattlefieldCommander playerUnits = new BattlefieldCommander();

        if (TransitionManager.GetInstance.isPlayerAttacker)
        {
            playerUnits = BattlefieldSpawnManager.GetInstance.attackingCommander;
        }
        else
        {
            playerUnits = BattlefieldSpawnManager.GetInstance.defendingCommander;
        }

        // CHANGE PLAYER DATA COUNT STUFF TO UNITS CARRIED (SO PLAYER CAN USE OTHER UNITS LATER ON).
        for (int i = 0; i < playerUnits.unitsCarried.Count; i++)
        {
            TroopsInformation tmp = PlayerGameManager.GetInstance.playerData.troopsList.Find(x => x.unitInformation.unitName == playerUnits.unitsCarried[i].unitInformation.unitName);
            tmp.totalReturningUnitCount = playerUnits.CheckUnitCount(playerUnits.unitsCarried[i].unitInformation.unitName);
            tmp.totalUnitCount         -= (tmp.totalReturningUnitCount + playerUnits.CheckUnitDeathCount(playerUnits.unitsCarried[i].unitInformation.unitName));
        }

        SaveLoadManager.GetInstance.SaveCurrentData();
    }
Ejemplo n.º 12
0
    public void ResetCustomBattlePanel()
    {
        attackingCommander = new BattlefieldCommander();
        curAtkIdx          = 0;
        attackerControlIdx = 2;
        attackerControl.SwitchToThisControl((PlayerControlType)attackerControlIdx);

        BaseHeroInformationData newHero = BattlefieldSpawnManager.GetInstance.unitStorage.heroStorage[curAtkIdx];

        // TEMPORARY UNTIL PREFABS FOR UNIQUE HEROES ARE CREATED
        newHero.unitInformation.unitName       = "Player";
        newHero.unitInformation.prefabDataPath = "Assets/Resources/Prefabs/Unit and Items/Player.prefab";

        attackingLeader.SetupHero(newHero);
        attackingCommander.SetupBasicCommander();


        defendingCommander = new BattlefieldCommander();
        curAtkIdx          = 0;
        defenderControlIdx = 0;
        defenderControl.SwitchToThisControl((PlayerControlType)defenderControlIdx);

        BaseHeroInformationData startHero = BattlefieldSpawnManager.GetInstance.unitStorage.heroStorage[curDefIdx];

        // TEMPORARY UNTIL PREFABS FOR UNIQUE HEROES ARE CREATED
        startHero.unitInformation.unitName       = "Player";
        startHero.unitInformation.prefabDataPath = "Assets/Resources/Prefabs/Unit and Items/Player.prefab";

        defendingLeader.SetupHero(startHero);
        defendingCommander.SetupBasicCommander();


        gameConditionPanel.SetActive(false);

        SetupCustomBattlePanel();
    }
Ejemplo n.º 13
0
 public void AssignCommander(BattlefieldCommander thisCommander)
 {
     currentCommander = thisCommander;
     PanelControl();
 }
        public void ShowCampaignRewards(bool playerHasWon, List <ResourceReward> rewards, TerritoryOwners enemyOwner, BattlefieldCommander playerCommander)
        {
            CampaignRewardsPanel thisPanel = (playerHasWon) ? winRewardsPanel : defeatRewardsPanel;

            thisPanel.playerCommander = playerCommander;
            if (thisPanel.playerRewards == null)
            {
                thisPanel.playerRewards = new List <ResourceReward>();
            }
            thisPanel.playerRewards = rewards;
            thisPanel.enemyOwner    = enemyOwner;

            if (TransitionManager.GetInstance != null && TransitionManager.GetInstance.attackedPointInformationData != null)
            {
                thisPanel.territoryName.text = TransitionManager.GetInstance.attackedPointInformationData.pointName;
            }

            thisPanel.gameObject.SetActive(true);
        }
Ejemplo n.º 15
0
    public void CheckPostVictorious()
    {
        BattlefieldSceneManager.GetInstance.battleUIInformation.dayTimer.PauseTimer();

        if (playerWon)
        {
            AudioManager.GetInstance.PlayThisBackGroundMusic(BackgroundMusicType.WinInBattle);
        }
        else
        {
            AudioManager.GetInstance.PlayThisBackGroundMusic(BackgroundMusicType.DefeatInBattle);
        }

        if (!BattlefieldSceneManager.GetInstance.isCampaignMode)
        {
            BattlefieldSceneManager.GetInstance.customBattlePanel.ResetCustomBattlePanel();
            BattlefieldSceneManager.GetInstance.customBattlePanel.gameCustomPanel.SetActive(true);
            BattlefieldSceneManager.GetInstance.battleUIInformation.EndBattle();
            BattlefieldPathManager.GetInstance.ResetAllPaths();
            BattlefieldSpawnManager.GetInstance.RetreatAllUnits();
            unitsInCamp = true;
        }
        else
        {
            BattlefieldPathManager.GetInstance.ResetAllPaths();
            BattlefieldSpawnManager.GetInstance.RetreatAllUnits();
            unitsInCamp = true;

            if (TransitionManager.GetInstance != null && !TransitionManager.GetInstance.isNewGame)
            {
                ReturnUnitsToPlayerData();
                ReturnUnitsToEnemyData();

                ObtaincoinRewards();
            }
            if (TransitionManager.GetInstance != null && TransitionManager.GetInstance.isEngagedWithMapPoint)
            {
                ObtainTerritoryRewards();

                BattlefieldCommander playerUnits = new BattlefieldCommander();
                if (TransitionManager.GetInstance.isPlayerAttacker)
                {
                    playerUnits = BattlefieldSpawnManager.GetInstance.attackingCommander;
                }
                else
                {
                    playerUnits = BattlefieldSpawnManager.GetInstance.defendingCommander;
                }

                BattlefieldSceneManager.GetInstance.battleUIInformation.ShowCampaignRewards(playerWon, coinRewards, enemyTerritoryName, playerUnits);
            }
            else
            {
                // TUTORIAL
                if (TransitionManager.GetInstance != null && TransitionManager.GetInstance.isNewGame)
                {
                    PlayPrologueResultScene();
                }
                else // TRAVELLER
                {
                }
            }
        }
    }
 public void SetupDefendingCommander(BattlefieldCommander thisCommander)
 {
     defendingCommander = thisCommander;
 }
 public void SetupAttackingCommander(BattlefieldCommander thisCommander)
 {
     attackingCommander = thisCommander;
 }
Ejemplo n.º 18
0
        public void InitializeCampaignBattles(bool isFromCreationScene = false)
        {
            if (!TransitionManager.GetInstance.isEngagedWithTraveller &&
                !TransitionManager.GetInstance.isEngagedWithMapPoint)
            {
                return;
            }

            BattlefieldCommander enemyCommander = new BattlefieldCommander();

            BaseTravellerData tmp = new BaseTravellerData();

            tmp = PlayerGameManager.GetInstance.unitsToSend;


            // If He's the defender
            if (!TransitionManager.GetInstance.isPlayerAttacker)
            {
                // MAP NODE
                if (TransitionManager.GetInstance.isEngagedWithMapPoint)
                {
                    if (!string.IsNullOrEmpty(TransitionManager.GetInstance.attackedPointInformationData.pointName))
                    {
                        tmp.troopsCarried.AddRange(TransitionManager.GetInstance.attackedPointInformationData.troopsStationed);
                        tmp.leaderUnit.Add(TransitionManager.GetInstance.attackedPointInformationData.leaderUnit);
                    }

                    if (TransitionManager.GetInstance.attackedPointInformationData.travellersOnPoint != null &&
                        TransitionManager.GetInstance.attackedPointInformationData.travellersOnPoint.Count > 0)
                    {
                        enemyCommander = ObtainCampaignMapPointEnemyCommander();
                    }
                }
                // TRAVELLER
                else
                {
                    if (TransitionManager.GetInstance.attackedTravellerData.ObtainTotalUnitCount() > 0)
                    {
                        Debug.Log("Initializing Battle Thru Traveller");
                        enemyCommander = BattlefieldCommander.ConvertTravellerToCommander(TransitionManager.GetInstance.attackedTravellerData);
                    }
                }
            }
            else //  If He's the attacker
            {
                // MAP NODE
                if (TransitionManager.GetInstance.isEngagedWithMapPoint)
                {
                    if (!string.IsNullOrEmpty(TransitionManager.GetInstance.attackedPointInformationData.pointName))
                    {
                        Debug.Log("Initializing Battle Thru Map Point");
                        enemyCommander = BattlefieldCommander.ConvertTravellerToCommander(TransitionManager.GetInstance.attackedPointInformationData);
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(TransitionManager.GetInstance.attackedTravellerData.travellersName))
                    {
                        Debug.Log("Initializing Battle Thru Traveller");
                        enemyCommander = BattlefieldCommander.ConvertTravellerToCommander(TransitionManager.GetInstance.attackedTravellerData);
                    }
                }
            }

            spawnManager.SetupPlayerCommander(tmp, TransitionManager.GetInstance.isPlayerAttacker);



            if (TransitionManager.GetInstance.isPlayerAttacker)
            {
                SwitchAttackerControls(PlayerControlType.PlayerOne);
                SwitchDefenderControls(PlayerControlType.Computer);
                BattlefieldSystemsManager.GetInstance.playerTeam = TeamType.Attacker;

                spawnManager.ImplementTechnology(spawnManager.attackingCommander);
                spawnManager.SetupDefendingCommander(enemyCommander);
            }
            else
            {
                SwitchAttackerControls(PlayerControlType.Computer);
                SwitchDefenderControls(PlayerControlType.PlayerOne);
                BattlefieldSystemsManager.GetInstance.playerTeam = TeamType.Defender;

                spawnManager.ImplementTechnology(spawnManager.defendingCommander);
                spawnManager.SetupAttackingCommander(enemyCommander);
            }

            InitializeArea(isFromCreationScene);
        }