| Main/System/Battle/BattleField/BattleField.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Battle/BattleField/BattleRootNode.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Battle/BattleField/StoryBattleField.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Battle/BattleField/StoryBossBattleField.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Battle/BattleManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Battle/BattleObject/BattleObject.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/System/Battle/BattleField/BattleField.cs
@@ -130,7 +130,9 @@ 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) @@ -138,13 +140,23 @@ 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) { Main/System/Battle/BattleField/BattleRootNode.cs
@@ -50,6 +50,9 @@ _blueTeamNodeList.Add(blueTrans.gameObject); } DontDestroyOnLoad(gameObject); // SetSortingOrder(); } Main/System/Battle/BattleField/StoryBattleField.cs
@@ -38,6 +38,14 @@ 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) @@ -51,15 +59,20 @@ // 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() @@ -294,7 +307,17 @@ 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; } } Main/System/Battle/BattleField/StoryBossBattleField.cs
@@ -11,6 +11,8 @@ protected MainLevelConfig levelConfig; protected MainChapterConfig chapterConfig; public StoryBossBattleField(string _guid) : base(_guid) { @@ -24,10 +26,20 @@ int level = FuncLineID;// 关卡 extendData = _extendData; levelConfig = MainLevelConfig.Get(level); chapterConfig = MainChapterConfig.Get(levelConfig.ChapterID); SetBattleMode(BattleMode.Record); } protected override void LoadMap(int mapID) { if (chapterConfig != null) { Texture texture = ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", chapterConfig.MapBG); battleRootNode.SetBackground(texture); } } public override void Release() { base.Release(); Main/System/Battle/BattleManager.cs
@@ -67,8 +67,8 @@ protected void OnPlayerLoginOk() { long exAttr1 = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.ExAttr1); long exAttr2 = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.ExAttr2); long exAttr1 = PlayerDatas.Instance.baseData.ExAttr1; long exAttr2 = PlayerDatas.Instance.baseData.ExAttr2; int MapID = 1; int FuncLineID = (int)exAttr2; Main/System/Battle/BattleObject/BattleObject.cs
@@ -294,6 +294,8 @@ } } bool isFatalAttack = (null != deadPack) && isLastHit; if (isFatalAttack) @@ -307,10 +309,18 @@ } else { if ((dmgInfo.IsType(DamageType.Damage) || dmgInfo.IsRealdamage())) if (dmgInfo.IsType(DamageType.Block)) { motionBase.PlayAnimation(MotionName.hit, false); battleField.battleEffectMgr.PlayEffect(this, 19999, heroRectTrans, Camp); } else { if ((dmgInfo.IsType(DamageType.Damage) || dmgInfo.IsRealdamage())) { motionBase.PlayAnimation(MotionName.hit, false); } } }