| | |
| | | battleObjMgr.Init(this, redTeamList[redTeamIndex], blueTeamList[blueTeamIndex]); |
| | | } |
| | | |
| | | battleRootNode.SetBackground(ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", "mainui_img_277")); |
| | | LoadMap(MapID); |
| | | |
| | | // battleRootNode.SetBackground(ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", "mainui_img_277")); |
| | | |
| | | SetBattleStartState(); |
| | | if (MapID == 1) |
| | |
| | | SetSpeedRatio(BattleManager.Instance.speedGear[AutoFightModel.Instance.fightSpeed - 1]); |
| | | } |
| | | else |
| | | { |
| | | { |
| | | SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]); |
| | | } |
| | | SetRootNodePosition(); |
| | | rejectNewPackage = false; |
| | | OnRoundChange?.Invoke(round, turnMax); |
| | | } |
| | | |
| | | protected virtual void LoadMap(int mapID) |
| | | { |
| | | BattleMapConfig battleMapConfig = BattleMapConfig.Get(mapID); |
| | | if (battleMapConfig != null) |
| | | { |
| | | Texture texture = ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", battleMapConfig.MapBg); |
| | | battleRootNode.SetBackground(texture); |
| | | } |
| | | } |
| | | |
| | | public void SetSpeedRatio(float ratio) |
| | | { |