| | |
| | | protected void CreateTeam(List<GameObject> posNodeList, Dictionary<int, BattleObject> campDict, TeamBase teamBase, BattleCamp _Camp) |
| | | { |
| | | DestroyTeam(campDict); |
| | | for (int i = 0; i < teamBase.teamHeros.Length; i++) |
| | | if (teamBase == null) |
| | | { |
| | | TeamHero teamHero = teamBase.teamHeros[i]; |
| | | if (teamHero != null) |
| | | { |
| | | BattleObject battleObj = BattleObjectFactory.CreateBattleObject(battleField, posNodeList, teamHero, _Camp); |
| | | allBattleObjDict.Add(battleObj.ObjID, battleObj); |
| | | campDict.Add(teamHero.positionNum, battleObj); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | for (int i = 0; i < teamBase.serverHeroes.Length; i++) |
| | | { |
| | | TeamHero teamHero = teamBase.serverHeroes[i]; |
| | | if (teamHero != null) |
| | | { |
| | | BattleObject battleObj = BattleObjectFactory.CreateBattleObject(battleField, posNodeList, teamHero, _Camp); |
| | | allBattleObjDict.Add(battleObj.ObjID, battleObj); |
| | | campDict.Add(teamHero.positionNum, battleObj); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public BattleObject GetBattleObject(int objId) |
| | |
| | | return battleObj; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public List<BattleObject> GetBattleObjList(BattleCamp _Camp) |
| | | { |
| | | if (_Camp == BattleCamp.Red) |
| | | { |
| | | return redCampList; |
| | | } |
| | | else |
| | | { |
| | | return blueCampList; |
| | | } |
| | | } |
| | | |
| | | public List<BattleObject> GetBattleObjList(H0604_tagUseSkillAttack tagUseSkillAttack) |
| | |
| | | |
| | | } |
| | | |
| | | // 空闲状态 |
| | | public void HaveRest(BattleCamp _Camp) |
| | | { |
| | | // 休息状态 |
| | | if (_Camp == BattleCamp.Red) |
| | | { |
| | | foreach (var item in redCampDict.Values) |
| | | { |
| | | item.HaveRest(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | foreach (var item in blueCampDict.Values) |
| | | { |
| | | item.HaveRest(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void Release() |
| | | { |
| | | DestroyTeam(redCampDict); |