| | |
| | | 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); |
| | | } |
| | |
| | | // 闪避结束 |
| | | public virtual void OnDodgeEnd(Action _complete = null) |
| | | { |
| | | float pingpongTime = 0.2f; |
| | | RectTransform rectTrans = heroRectTrans; |
| | | |
| | | var tween = rectTrans.DOAnchorPos(Vector3.zero, pingpongTime) |