| | |
| | | using System; |
| | | using System; |
| | | using LitJson; |
| | | using UnityEngine; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | |
| | | public class StoryBossBattleField : BattleField |
| | |
| | | |
| | | } |
| | | |
| | | public override void Init(int MapID, int FuncLineID, JsonData _extendData, |
| | | public override async UniTask Init(int MapID, int FuncLineID, JsonData _extendData, |
| | | List<TeamBase> _redTeamList, List<TeamBase> _blueTeamList, byte turnMax) |
| | | { |
| | | int level = FuncLineID;// 关卡 |
| | |
| | | levelConfig = MainLevelConfig.Get(level); |
| | | chapterConfig = MainChapterConfig.Get(levelConfig.ChapterID); |
| | | |
| | | base.Init(MapID, FuncLineID, extendData, _redTeamList, _blueTeamList, turnMax); |
| | | await base.Init(MapID, FuncLineID, extendData, _redTeamList, _blueTeamList, turnMax); |
| | | |
| | | SetBattleMode(BattleMode.Record); |
| | | } |
| | | |
| | | protected override void LoadMap(int mapID) |
| | | protected override async UniTask LoadMap(int mapID) |
| | | { |
| | | if (chapterConfig != null) |
| | | { |
| | | Texture texture = ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", chapterConfig.MapBG); |
| | | Texture texture = await ResManager.Instance.LoadAssetAsync<Texture>("Texture/FullScreenBg", chapterConfig.MapBG); |
| | | battleRootNode.SetBackground(texture); |
| | | } |
| | | } |
| | |
| | | StoryBossBattleWin fsBattleWin = UIManager.Instance.GetUI<StoryBossBattleWin>();// as FullScreenBattleWin; |
| | | if (null == fsBattleWin) |
| | | { |
| | | fsBattleWin = UIManager.Instance.OpenWindow<StoryBossBattleWin>(); |
| | | fsBattleWin = UIManager.Instance.OpenWindowAsync<StoryBossBattleWin>().Forget(); |
| | | } |
| | | fsBattleWin.SetBattleField(this); |
| | | } |