| | |
| | | protected void CreateTeam(Dictionary<int, BattleObject> campDict, TeamBase teamBase) |
| | | { |
| | | DestroyTeam(campDict); |
| | | for (int i = 0; i < teamBase.teamCards.Length; i++) |
| | | for (int i = 0; i < teamBase.teamHeros.Length; i++) |
| | | { |
| | | TeamCard teamCard = teamBase.teamCards[i]; |
| | | if (teamCard != null) |
| | | TeamHero teamHero = teamBase.teamHeros[i]; |
| | | if (teamHero != null) |
| | | { |
| | | BattleObject battleObj = BattleObjectFactory.CreateBattleObject(teamCard); |
| | | battleObj.Init(teamCard); |
| | | campDict.Add(teamCard.cardIndex, battleObj); |
| | | BattleObject battleObj = BattleObjectFactory.CreateBattleObject(teamHero); |
| | | battleObj.Init(teamHero); |
| | | campDict.Add(teamHero.heroIndex, battleObj); |
| | | } |
| | | } |
| | | } |