public override void OnGetResult(IResult result, IResultControl control) { base.OnGetResult(result, control); if (result.ClassID == (int)ENResult.Dead) {//死亡目标是自己,所以在OnGetResult BuffInfo info = GameTable.BuffTableAsset.Lookup(BuffID); foreach (var item in info.BuffResultList) { if (item.ID == (int)ClassID) { //设置死亡result的复活 ResultDead rd = result as ResultDead; rd.m_isRelive = true; IsNeedTick = true; m_reliveDuration = item.ParamList[0];//第一个参数为复活的时间 m_reliveStartTime = Time.time; } } } }
public override void OnGetResult(IResult result, IResultControl control) { base.OnGetResult(result, control); switch (m_type) { case ENOutlawDeathType.enDead: { if (result.ClassID == (int)ENResult.Dead) { //设置死亡Result返回标志位 ResultDead rd = result as ResultDead; rd.m_offExec = true; //设置当前人物的血量 ActorManager.Singleton.Lookup(TargetID).Props.SetProperty_Int32(ENProperty.hp, 1); } } break; default: break; } }