From a178792731891bcd477ab0812ced1ab5fb9229fc Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期四, 09 十月 2025 15:32:54 +0800 Subject: [PATCH] 125 战斗 闪避增加幻影 --- Main/System/Battle/BattleObject/BattleObject.cs | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Main/System/Battle/BattleObject/BattleObject.cs b/Main/System/Battle/BattleObject/BattleObject.cs index ba47e96..ec4ec52 100644 --- a/Main/System/Battle/BattleObject/BattleObject.cs +++ b/Main/System/Battle/BattleObject/BattleObject.cs @@ -288,13 +288,21 @@ teamHero.curHp = Math.Max(0, teamHero.curHp - (int)bounceHP); } + + const float pingpongTime = 0.2f; // 闂伩寮�濮� public virtual void OnDodgeBegin() { - float pingpongTime = 0.2f; RectTransform rectTrans = heroRectTrans; var tween = rectTrans.DOAnchorPos(new Vector3(-30, 0, 0), pingpongTime) .SetEase(Ease.OutCubic); + + motionBase.ShowIllusionShadow(true); + + tween.onComplete += () => + { + motionBase.ShowIllusionShadow(false); + }; battleField.battleTweenMgr.OnPlayTween(tween); } @@ -302,7 +310,6 @@ // 闂伩缁撴潫 public virtual void OnDodgeEnd(Action _complete = null) { - float pingpongTime = 0.2f; RectTransform rectTrans = heroRectTrans; var tween = rectTrans.DOAnchorPos(Vector3.zero, pingpongTime) -- Gitblit v1.8.0