Main/Component/UI/Effect/UIEffectPlayer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Battle/BattleField/BattleField.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Battle/BattleField/StoryBattleField.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Main/MainWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/Component/UI/Effect/UIEffectPlayer.cs
@@ -49,4 +49,13 @@ return effectPlayer; } public void SetEnabled(bool isEnable) { if (spineComp == null) { return; } spineComp.enabled = isEnable; } } Main/System/Battle/BattleField/BattleField.cs
@@ -121,7 +121,14 @@ battleRootNode.SetBackground(ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", "mainui_img_277")); SetBattleStartState(); SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]); if (MapID == 1) { SetSpeedRatio(BattleManager.Instance.speedGear[AutoFightModel.Instance.fightSpeed - 1]); } else { SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]); } SetRootNodePosition(); } Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs
@@ -5,6 +5,7 @@ public class HandModeOperationAgent : IOperationAgent { protected StoryBattleField storyBattleField; bool autoNext = false; //预存玩家的下一次攻击,让下一次自动执行,因为玩家点的时机不一定是刚好的可攻击状态 public HandModeOperationAgent(BattleField battleField) : base(battleField) { @@ -14,14 +15,24 @@ public override void Run() { base.Run(); if (autoNext) { if (storyBattleField.RequestFight()) { //直到成功为止 autoNext = false; } } } // 通过主界面的按钮推动(调用)DoNext public override void DoNext() { base.DoNext(); storyBattleField.RequestFight(); if (!storyBattleField.RequestFight()) { autoNext = true; } } Main/System/Battle/BattleField/StoryBattleField.cs
@@ -179,17 +179,19 @@ } //请求单次战斗 public void RequestFight() //请求单次战斗, 返回是否成功操作(预判下一次是可以继续的状态) public bool RequestFight() { if (IsPause) { //外部控制 IsPause //还需考虑其他不可战斗状况,主线的BOSS战斗也是另外一个场景且不能切出来 等跳过或者结束 return; return true; } if (BattleManager.Instance.isWaitServerStory) return; { return true; } // 当前没有在播放战斗录像 if (!recordPlayer.IsPlaying()) @@ -209,7 +211,7 @@ dropList.Add(item.gridIndex); } EquipModel.Instance.NotifyItemDrop(dropList, null); return; return false; } // 检查一下锤子的消耗 @@ -217,8 +219,10 @@ { //多次防范 if (GetBattleMode() != BattleMode.Stop) { HaveRest(); return; } return true; } // 请求下一个战斗包 或者检查战斗是否结束 @@ -245,7 +249,7 @@ else { BattleDebug.LogError("unknown battle state"); return; return true; } @@ -258,13 +262,21 @@ { BattleManager.Instance.MainFightRequest(4); } return true; } else { } } else { if (!AutoFightModel.Instance.isAutoAttack) { BattleDebug.LogError("action doesnt finish, wait a moment please"); } } return false; } protected override void SetRootNodePosition() Main/System/Main/MainWin.cs
@@ -24,9 +24,10 @@ [SerializeField] Image fightHeroImg; //战斗显示英雄 [SerializeField] ScaleTween fightHeroScale; //战斗显示英雄缩放 [SerializeField] UIEffectPlayer fightEffect; [SerializeField] UIEffectPlayer openCloseAnim; [SerializeField] FillTween cdTween; public bool isFirstOpen = true; //首次打开 public Text hammerText; protected override void InitComponent() @@ -77,6 +78,7 @@ return; } ClickAnimation(index); // 更新当前选中的标签索引 functionOrder = index; @@ -87,6 +89,27 @@ OpenSubUIByTabIndex(); } void ClickAnimation(int index) { if (isFirstOpen || (functionOrder != 0 && index == 0)) { openCloseAnim.onComplete = () => { openCloseAnim.SetEnabled(true); }; openCloseAnim.PlayByArrIndex(1); isFirstOpen = false; } else if (functionOrder == 0 && index != 0) { openCloseAnim.onComplete = () => { openCloseAnim.SetEnabled(true); }; openCloseAnim.PlayByArrIndex(0); } } /// <summary> @@ -224,6 +247,7 @@ { //主城界面 fightOtherWinBG.SetActive(false); fightOtherWinWarnImg.SetActive(false); fightBG.SetActive(true); @@ -259,6 +283,7 @@ } void RefreshFightIng(bool isfighting = false) { if (isfighting)