| | |
| | | return true; |
| | | } |
| | | |
| | | public virtual void Hurt(BattleHurtParam battleHurtParam, RecordAction causingRecordAction = null) |
| | | public virtual RecordAction Hurt(BattleHurtParam battleHurtParam, RecordAction _causingRecordAction = null) |
| | | { |
| | | RecordAction recordAction = null; |
| | | bool isLastHit = battleHurtParam.hitIndex >= battleHurtParam.skillConfig.DamageDivide.Length - 1; |
| | | bool firstHit = battleHurtParam.hitIndex == 0; |
| | | |
| | |
| | | { |
| | | PushDropItems(battleHurtParam.battleDrops); |
| | | } |
| | | battleField.OnObjsDead(new List<BattleDeadPack>() { battleHurtParam.deadPack }, causingRecordAction); |
| | | recordAction = battleField.OnObjsDead(new List<BattleDeadPack>() { battleHurtParam.deadPack }, _causingRecordAction); |
| | | |
| | | } |
| | | else |
| | |
| | | // } |
| | | |
| | | } |
| | | |
| | | return recordAction; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | // 复活action |
| | | public void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData, bool reviveSelf = false) |
| | | public void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData, bool reviveSelf = false, RecordAction parentAction = null) |
| | | { |
| | | isReborning = true; |
| | | heroGo.SetActive(true); |
| | |
| | | heroRectTrans.anchoredPosition = Vector2.zero; |
| | | motionBase.skeletonAnim.skeleton.A = 0f; |
| | | motionBase.skeletonAnim.LateUpdate(); |
| | | 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; |
| | | |
| | | }); |
| | | // 【使用 BattleField.recordPlayer】 |
| | | // 原因:复活是角色的独立行为,不是技能内部产生的 |
| | | // 复活可能是被动触发的(如死亡后服务器发来的复活包),应该由主RecordPlayer管理 |
| | | // 使用InsertRecord可以插到队列最前面,保证复活表现的优先级 |
| | | battleField.recordPlayer.InsertRecord(recordAction); |
| | | |
| | | } |
| | | |
| | | public void AfterReborn() |