|  |  |  | 
|---|
|  |  |  | public override void Init(int MapID, int FuncLineID, JsonData _extendData, | 
|---|
|  |  |  | List<TeamBase> _redTeamList, List<TeamBase> _blueTeamList, byte turnMax) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | chapter = FuncLineID / 10000; | 
|---|
|  |  |  | wave = MapID == 1 ? FuncLineID % 100 : 1;//第几波怪 | 
|---|
|  |  |  | level = (FuncLineID % 10000) / 100; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | extendData = _extendData; | 
|---|
|  |  |  | chapterConfig = MainChapterConfig.Get(chapter); | 
|---|
|  |  |  | levelConfig = MainLevelConfig.Get(level); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | base.Init(MapID, FuncLineID, extendData, _redTeamList, _blueTeamList, turnMax); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (null == _blueTeamList || _blueTeamList.Count == 0) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // LoadBattleMode(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | chapter = FuncLineID / 10000; | 
|---|
|  |  |  | wave = MapID == 1 ? FuncLineID % 100 : 1;//第几波怪 | 
|---|
|  |  |  | level = (FuncLineID % 10000) / 100; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | extendData = _extendData; | 
|---|
|  |  |  | chapterConfig = MainChapterConfig.Get(chapter); | 
|---|
|  |  |  | levelConfig = MainLevelConfig.Get(level); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | TeamManager.Instance.OnTeamChange += OnTeamChange; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | protected override void LoadMap(int mapID) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (chapterConfig != null) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Texture texture = ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", chapterConfig.BG); | 
|---|
|  |  |  | battleRootNode.SetBackground(texture); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public override void Release() | 
|---|
|  |  |  | 
|---|
|  |  |  | protected override void SetRootNodePosition() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | battleRootNode.imgBackground.rectTransform.anchoredPosition = battleRootNode.bgPos1.anchoredPosition; | 
|---|
|  |  |  | battleRootNode.battleNode.anchoredPosition = battleRootNode.battleNodePos1.anchoredPosition; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | float screenRatio = (float)Screen.height / (float)Screen.width; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (screenRatio > 1.9f) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | battleRootNode.battleNode.anchoredPosition = battleRootNode.battleNodePos1.anchoredPosition + new Vector2(0, 60f); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | battleRootNode.battleNode.anchoredPosition = battleRootNode.battleNodePos1.anchoredPosition; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|