| | |
| | | { |
| | | PushDropItems(battleHurtParam.battleDrops); |
| | | } |
| | | battleField.OnObjsDead(new List<HB422_tagMCTurnFightObjDead>() { battleHurtParam.deadPack }); |
| | | battleField.OnObjsDead(new List<BattleDeadPack>() { battleHurtParam.deadPack }); |
| | | |
| | | } |
| | | else |
| | |
| | | battleField.battleTweenMgr.OnPlayTween(tween); |
| | | } |
| | | |
| | | public virtual void OnDeath(Action _onDeathAnimationComplete) |
| | | public virtual void OnDeath(Action _onDeathAnimationComplete, bool withoutAnime = false) |
| | | { |
| | | buffMgr.RemoveAllBuff(); |
| | | battleField.soundManager.PlayEffectSound(teamHero.heroConfig.DeathSFX, false); |
| | | motionBase.PlayDeadAnimation(() => |
| | | if (withoutAnime) |
| | | { |
| | | SetDeath(); |
| | | _onDeathAnimationComplete?.Invoke(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | motionBase.PlayDeadAnimation(() => |
| | | { |
| | | SetDeath(); |
| | | _onDeathAnimationComplete?.Invoke(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | public void SetDeath() |
| | |
| | | public void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData) |
| | | { |
| | | // 处理复活逻辑 |
| | | battleField.OnObjReborn((uint)ObjID); |
| | | RebornRecordAction recordAction = new RebornRecordAction(battleField, this, () => |
| | | { |
| | | battleField.OnObjReborn((uint)ObjID); |
| | | |
| | | teamHero.curHp = GeneralDefine.GetFactValue(vNetData.CurHP, vNetData.CurHPEx); |
| | | // Debug.LogError("OnReborn " + teamHero.curHp); |
| | | teamHero.isDead = false; |
| | | heroGo.SetActive(true); |
| | | motionBase.ResetForReborn(); |
| | | teamHero.curHp = GeneralDefine.GetFactValue(vNetData.CurHP, vNetData.CurHPEx); |
| | | heroRectTrans.anchoredPosition = Vector2.zero; |
| | | // Debug.LogError("OnReborn " + teamHero.curHp); |
| | | teamHero.isDead = false; |
| | | heroGo.SetActive(true); |
| | | motionBase.ResetForReborn(); |
| | | }); |
| | | battleField.recordPlayer.InsertRecord(recordAction); |
| | | } |
| | | |
| | | // 伤害还要看 是否闪避 暴击 and so on 需要有一个DamageType 服务器应该会给 |