| | |
| | | } |
| | | } |
| | | |
| | | public override Spine.TrackEntry PlaySkillAnimation(SkillConfig skillConfig, SkillBase skillBase, bool isCounter, Action onComplete) |
| | | public override Spine.TrackEntry PlaySkillAnimation(SkillConfig skillConfig, SkillSkinConfig skillSkinConfig, SkillBase skillBase, bool isCounter, Action onComplete) |
| | | { |
| | | return motionBase.PlaySkillAnimation(skillConfig, skillBase, isCounter, onComplete); |
| | | return motionBase.PlaySkillAnimation(skillConfig, skillSkinConfig, skillBase, isCounter, onComplete); |
| | | } |
| | | |
| | | public override bool CanStartDeath() |
| | |
| | | return motionBase.CanStartDeath(); |
| | | } |
| | | |
| | | public override bool CanCastSkillAnimation(SkillConfig skillConfig) |
| | | public override bool CanCastSkillAnimation(SkillSkinConfig skillSkinConfig) |
| | | { |
| | | return motionBase.CanCastSkill(skillConfig); |
| | | return motionBase.CanCastSkill(skillSkinConfig); |
| | | } |
| | | |
| | | public override SkeletonAnimation GetSkeletonAnimation() |
| | |
| | | public override DeathRecordAction Hurt(BattleHurtParam battleHurtParam, SkillRecordAction _parentSkillAction = null) |
| | | { |
| | | DeathRecordAction recordAction = null; |
| | | bool isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillConfig.DamageDivide.Length - 1; |
| | | bool isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillSkinConfig.DamageDivide.Length - 1; |
| | | bool firstHit = battleHurtParam.hitIndex == 0; |
| | | |
| | | // 添加调试日志 |
| | |
| | | |
| | | // ============ 应用目标的血量和护盾变化 ============ |
| | | ApplyHurtToTarget(battleHurtParam, isLastHit); |
| | | |
| | | |
| | | // 这里 |
| | | if (dmgInfo.IsType(DamageType.Dodge) /*&& !buffMgr.isControled[BattleConst.HardControlGroup]*/)//如果被控制了还闪避了 要看看服务器怎么处理了 |
| | | if (dmgInfo.IsType(DamageType.Dodge) || dmgInfo.IsType(DamageType.CompletelyDodge))//如果被控制了还闪避了 要看看服务器怎么处理了 |
| | | { |
| | | if (isLastHit) |
| | | { |
| | |
| | | |
| | | if (firstHit) |
| | | { |
| | | OnDodgeBegin(); |
| | | OnDodgeBegin(dmgInfo.IsType(DamageType.Dodge) ? DamageType.Dodge : DamageType.CompletelyDodge); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | const float pingpongTime = 0.4f; |
| | | // 闪避开始 |
| | | public override void OnDodgeBegin() |
| | | public override void OnDodgeBegin(DamageType damageType) |
| | | { |
| | | RectTransform rectTrans = heroRectTrans; |
| | | var tween = rectTrans.DOAnchorPos(new Vector3(-30, 0, 0), pingpongTime) |
| | |
| | | |
| | | motionBase.ShowIllusionShadow(true); |
| | | |
| | | DamageNumConfig damageNumConfig = DamageNumConfig.Get((int)DamageType.Dodge); |
| | | int damageTypeInt = damageType == DamageType.Dodge ? (int)damageType : BattleConst.CompletelyDodge; |
| | | |
| | | DamageNumConfig damageNumConfig = DamageNumConfig.Get(damageTypeInt); |
| | | |
| | | string dodgeStr = ((char)damageNumConfig.prefix).ToString(); |
| | | |
| | |
| | | |
| | | protected override void ApplyCasterHpChange(long newHp) |
| | | { |
| | | if (teamHero == null) return; |
| | | teamHero.curHp = newHp; |
| | | } |
| | | |
| | | public override long GetCurHp() => teamHero.curHp; |
| | | public override long GetMaxHp() => teamHero.maxHp; |
| | | public override void SetCurHp(long value) { teamHero.curHp = value; } |
| | | public override void SetIsDead(bool value) { teamHero.isDead = value; } |
| | | public override long GetCurHp() => teamHero == null ? 0 : teamHero.curHp; |
| | | public override long GetMaxHp() => teamHero == null ? 0 : teamHero.maxHp; |
| | | public override void SetCurHp(long value) { if (teamHero == null) return; teamHero.curHp = value; } |
| | | public override void SetIsDead(bool value) { if (teamHero == null) return; teamHero.isDead = value; } |
| | | |
| | | public override int GetNPCID() => teamHero.NPCID; |
| | | public override long GetFightPower() => teamHero.fightPower; |
| | | public override int GetNPCID() => teamHero == null ? 0 : teamHero.NPCID; |
| | | public override long GetFightPower() => teamHero == null ? 0 : teamHero.fightPower; |
| | | |
| | | // 伤害还要看 是否闪避 暴击 and so on 需要有一个DamageType 服务器应该会给 |
| | | protected override BattleDmgInfo PopDamage(BattleHurtParam battleHurtParam) |
| | |
| | | } |
| | | |
| | | // ============ 应用施法者的血量和护盾变化 ============ |
| | | bool isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillConfig.DamageDivide.Length - 1; |
| | | bool isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillSkinConfig.DamageDivide.Length - 1; |
| | | ApplyHurtToCaster(battleHurtParam, isLastHit); |
| | | |
| | | // 和Hurt一样,调用PopDamage处理吸血/反伤的显示 |