|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | motionBase.Release(); | 
|---|
|  |  |  | motionBase = null; | 
|---|
|  |  |  | buffMgr.Release(); | 
|---|
|  |  |  | buffMgr = null; | 
|---|
|  |  |  | teamHero = null; | 
|---|
|  |  |  | ObjID = 0; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public virtual void Hurt(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig, bool playAnimation = true) | 
|---|
|  |  |  | public virtual void Hurt(List<long> damageValues, long _totalDamage, | 
|---|
|  |  |  | HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig, int hitIndex, | 
|---|
|  |  |  | BattleDrops battleDrops, HB422_tagMCTurnFightObjDead deadPack) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | BattleDmgInfo dmgInfo = PopDamage(damageValues, _totalDamage, hurt, skillConfig); | 
|---|
|  |  |  | bool isLastHit = hitIndex >= skillConfig.DamageDivide.Length - 1; | 
|---|
|  |  |  | bool firstHit = hitIndex == 0; | 
|---|
|  |  |  | BattleDmgInfo dmgInfo = PopDamage(damageValues, _totalDamage, hurt, skillConfig, isLastHit); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if ((dmgInfo.IsType(DamageType.Damage) || dmgInfo.IsRealdamage()) && playAnimation) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //  这里 | 
|---|
|  |  |  | if (dmgInfo.IsType(DamageType.Dodge)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | motionBase.PlayAnimation(MotionName.hit, false); | 
|---|
|  |  |  | if (isLastHit) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | DodgeFinishAction dodgeFinish = new DodgeFinishAction(battleField, this); | 
|---|
|  |  |  | battleField.recordPlayer.InsertRecord(dodgeFinish); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (firstHit) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | OnDodgeBegin(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bool isFatalAttack = (null != deadPack) && isLastHit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (isFatalAttack) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (null != battleDrops) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | PushDropItems(battleDrops); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | battleField.OnObjsDead(new List<HB422_tagMCTurnFightObjDead>() { deadPack }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if ((dmgInfo.IsType(DamageType.Damage) || dmgInfo.IsRealdamage())) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | motionBase.PlayAnimation(MotionName.hit, false); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void SuckHp(uint suckHP, SkillConfig skillConfig) | 
|---|
|  |  |  | 
|---|
|  |  |  | teamHero.curHp = Math.Max(0, teamHero.curHp - (int)bounceHP); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const float pingpongTime = 0.4f; | 
|---|
|  |  |  | //  闪避开始 | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 伤害还要看 是否闪避 暴击 and so on 需要有一个DamageType 服务器应该会给 | 
|---|
|  |  |  | protected virtual BattleDmgInfo PopDamage(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig) | 
|---|
|  |  |  | protected virtual BattleDmgInfo PopDamage(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig, bool isLastHit) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | BattleDmgInfo battleDmgInfo = new BattleDmgInfo(battleField.guid, damageValues, this, hurt, skillConfig); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (battleDmgInfo.IsType(DamageType.Dodge)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | OnDodgeBegin(); | 
|---|
|  |  |  | DodgeFinishAction dodgeFinish = new DodgeFinishAction(battleField, this); | 
|---|
|  |  |  | battleField.recordPlayer.InsertRecord(dodgeFinish); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | BattleDmgInfo battleDmgInfo = new BattleDmgInfo(battleField.guid, damageValues, this, hurt, skillConfig, isLastHit); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int currentHurtHp = 0; | 
|---|
|  |  |  | for (int i = 0; i < damageValues.Count; i++) | 
|---|