private void FindEyeTarget(List <PoolObjHandle <ActorRoot> > _srcList, int _count) { _srcList.Sort(delegate(PoolObjHandle <ActorRoot> a, PoolObjHandle <ActorRoot> b) { EyeWrapper eyeWrapper = (EyeWrapper)a.get_handle().ActorControl; EyeWrapper eyeWrapper2 = (EyeWrapper)b.get_handle().ActorControl; int lifeTime = eyeWrapper.LifeTime; int lifeTime2 = eyeWrapper2.LifeTime; int targetHpRate = HitTriggerDurationContext.GetTargetHpRate(a); int targetHpRate2 = HitTriggerDurationContext.GetTargetHpRate(b); if (targetHpRate < targetHpRate2) { return(-1); } if (targetHpRate > targetHpRate2) { return(1); } if (lifeTime > lifeTime2) { return(-1); } if (lifeTime < lifeTime2) { return(1); } return(0); }); for (int i = 0; i < _count; i++) { this.triggerPriority.Add(_srcList.get_Item(i)); } }
public void CopyData(ref HitTriggerDurationContext r) { this.triggerHeroList.Clear(); this.triggerMonsterList.Clear(); this.triggerOrganList.Clear(); this.triggerEyeList.Clear(); this.triggerPriority.Clear(); this.collidedActors.Clear(); this.hit = r.hit; this.residueActorCount = r.residueActorCount; this.collideCountMap.Clear(); this.collideTimeMap.Clear(); this.attackActor = r.attackActor; this.triggerActor = r.triggerActor; this.lastTime = r.lastTime; this.localTime = r.localTime; this.deltaTime = r.deltaTime; this.bFirstProcess = r.bFirstProcess; this.bUseTriggerObj = r.bUseTriggerObj; this.bCheckSight = r.bCheckSight; this.bTriggerMode = r.bTriggerMode; this.bTriggerBounceBullet = r.bTriggerBounceBullet; this.TriggeredBuffContextList.Clear(); this.bFilterEye = r.bFilterEye; this.TargetSkillLeaveRemove_1 = r.TargetSkillLeaveRemove_1; this.TargetSkillLeaveRemove_2 = r.TargetSkillLeaveRemove_2; this.TargetSkillLeaveRemove_3 = r.TargetSkillLeaveRemove_3; this.RemoveSkillList.Clear(); }
public void CopyData(ref HitTriggerDurationContext r) { this.triggerHeroList.Clear(); this.triggerMonsterList.Clear(); this.triggerOrganList.Clear(); this.triggerEyeList.Clear(); this.triggerPriority.Clear(); this.collidedActors.Clear(); this.hit = r.hit; this.residueActorCount = r.residueActorCount; this.collideCountMap.Clear(); this.collideTimeMap.Clear(); this.attackActor = r.attackActor; this.triggerActor = r.triggerActor; this.lastTime = r.lastTime; this.localTime = r.localTime; this.deltaTime = r.deltaTime; this.bFirstProcess = r.bFirstProcess; this.type_Filters = null; this.type_actorList = null; this.bUseTriggerObj = r.bUseTriggerObj; this.bCheckSight = r.bCheckSight; this.bTriggerMode = r.bTriggerMode; this.TriggeredBuffContextList.Clear(); this.bFilterEye = r.bFilterEye; }
private void LowestHpFindTarget(List <PoolObjHandle <ActorRoot> > _srcList, int _count) { _srcList.Sort(delegate(PoolObjHandle <ActorRoot> a, PoolObjHandle <ActorRoot> b) { int targetHpRate = HitTriggerDurationContext.GetTargetHpRate(a); int targetHpRate2 = HitTriggerDurationContext.GetTargetHpRate(b); if (targetHpRate == targetHpRate2) { return(0); } if (targetHpRate < targetHpRate2) { return(-1); } return(1); }); for (int i = 0; i < _count; i++) { this.triggerPriority.Add(_srcList.get_Item(i)); } }
private void FilterCoordActor(ref PoolObjHandle <ActorRoot> actorPtr) { ActorRoot handle = actorPtr.get_handle(); if (handle.shape == null || this.TargetObjTypeFilter(ref this._coordInActor, handle) || !HitTriggerDurationContext.Intersects(handle, this._coordShape, this.bEdgeCheck) || this.TargetCollideTimeFiler(handle) || this.TargetCollideCountFilter(handle) || this.TargetMoveDirectionFilter(ref this._coordInActor, ref actorPtr)) { return; } this.collidedActors.Add(actorPtr); this.type_actorList[(int)handle.TheActorMeta.ActorType].Add(actorPtr); }