public void ForeachActors(SceneManagement.Coordinate coord, SceneManagement.Process proc) { if (coord.X == -1 || coord.Y == -1) { return; } this.invokeIndex++; int num = coord.Y * this.TileCountX + coord.X; for (int i = 0; i < coord.NumY; i++) { for (int j = 0; j < coord.NumX; j++) { List <SceneManagement.Node> list = this.tiles[num + j].nodes; int count = list.get_Count(); for (int k = 0; k < count; k++) { SceneManagement.Node node = list.get_Item(k); if (node.owner && node.curInvokeIdx != this.invokeIndex) { node.curInvokeIdx = this.invokeIndex; proc(ref node.owner); } } } num += this.TileCountX; } }
public HitTriggerDurationContext() { this._coordHandler = new SceneManagement.Process(this.FilterCoordActor); this.bTriggerMode = false; this.TriggeredBuffContextList = new List <STriggeredBuffContext>(); this.bFilterEye = true; }
public uint SearchNearestTarget(ref PoolObjHandle <ActorRoot> _actorPtr, VInt3 _position, int _srchR) { this.Clear(); this.curActorPtr = _actorPtr; this.searchRadius = _srchR; this.searchPosition = _position; this.NearestHandler = new SceneManagement.Process(this.FilterNearestActorByPosition); SceneManagement instance = Singleton <SceneManagement> .GetInstance(); SceneManagement.Coordinate coord = default(SceneManagement.Coordinate); instance.GetCoord_Center(ref coord, _position.xz, _srchR); instance.UpdateDirtyNodes(); instance.ForeachActors(coord, this.NearestHandler); return(this.GetSearchPriorityTarget(true)); }
public uint SearchNearestTarget(ref PoolObjHandle <ActorRoot> _actorPtr, int _srchR, uint _typeMask) { this.Clear(); this.curActorPtr = _actorPtr; this.searchRadius = _srchR; this.searchTypeMask = _typeMask; this.NearestHandler = new SceneManagement.Process(this.FilterNearestActor); SceneManagement instance = Singleton <SceneManagement> .GetInstance(); SceneManagement.Coordinate coord = new SceneManagement.Coordinate(); instance.GetCoord_Center(ref coord, _actorPtr.handle.location.xz, _srchR); instance.UpdateDirtyNodes(); instance.ForeachActors(coord, this.NearestHandler); return(this.GetSearchPriorityTarget()); }
public uint SearchNearestTarget(ref PoolObjHandle <ActorRoot> _actorPtr, int _srchR, uint _typeMask, bool bIncludeMonsterNotInBattle = true, SearchTargetPriority priority = SearchTargetPriority.CommonAttack) { this.Clear(); this.curActorPtr = _actorPtr; this.searchRadius = _srchR; this.searchTypeMask = _typeMask; this.NearestHandler = new SceneManagement.Process(this.FilterNearestActor); SceneManagement instance = Singleton <SceneManagement> .GetInstance(); SceneManagement.Coordinate coord = default(SceneManagement.Coordinate); instance.GetCoord_Center(ref coord, _actorPtr.get_handle().location.get_xz(), _srchR); instance.UpdateDirtyNodes(); instance.ForeachActors(coord, this.NearestHandler); if (priority == SearchTargetPriority.CommonAttack) { return(this.GetSearchPriorityTarget(bIncludeMonsterNotInBattle)); } return(this.GetSearchPriorityTargetInLastHitMode(bIncludeMonsterNotInBattle)); }
public HitTriggerDurationContext() { this.triggerId = 0; this.attackerId = 0; this.triggerInterval = 30; this.bFilterEnemy = false; this.bFilterFriend = true; this.bFilterHero = false; this.bFileterMonter = false; this.bFileterOrgan = false; this.bFilterMyself = true; this.bFilterDead = true; this.bFilterDeadControlHero = true; this.bFilterMoveDirection = false; this.Angle = -1; this.TriggerActorCount = -1; this.SelectMode = HitTriggerSelectMode.RandomMode; this.TriggerActorInterval = 30; this.CollideMaxCount = -1; this.bEdgeCheck = false; this.bExtraBuff = false; this.SelfSkillCombineID_1 = 0; this.SelfSkillCombineID_2 = 0; this.SelfSkillCombineID_3 = 0; this.TargetSkillCombine_1 = 0; this.TargetSkillCombine_2 = 0; this.TargetSkillCombine_3 = 0; this.bTriggerBullet = false; this.BulletActionName = null; this.bAgeImmeExcute = false; this.triggerHeroList = new List <PoolObjHandle <ActorRoot> >(); this.triggerMonsterList = new List <PoolObjHandle <ActorRoot> >(); this.triggerOrganList = new List <PoolObjHandle <ActorRoot> >(); this.triggerEyeList = new List <PoolObjHandle <ActorRoot> >(); this.triggerPriority = new List <PoolObjHandle <ActorRoot> >(); this.collidedActors = new List <PoolObjHandle <ActorRoot> >(); this.hit = false; this.residueActorCount = 0; this.collideCountMap = new Dictionary <uint, int>(); this.collideTimeMap = new Dictionary <uint, int>(); this.attackActor = default(PoolObjHandle <ActorRoot>); this.triggerActor = default(PoolObjHandle <ActorRoot>); this.lastTime = 0; this.localTime = 0; this.deltaTime = 0; this.bFirstProcess = true; this.bUseTriggerObj = true; this.bCheckSight = false; this.bHitTargetHero = false; this.HitTargetHeroPos = VInt3.zero; this._coordInActor = default(PoolObjHandle <ActorRoot>); this._coordShape = null; this._coordHandler = new SceneManagement.Process(this.FilterCoordActor); this.bTriggerMode = false; this.bTriggerBounceBullet = false; this.TriggeredBuffContextList = new List <HitTriggerDurationContext.STriggeredBuffContext>(); this.bFilterEye = true; this.TargetSkillLeaveRemove_1 = false; this.TargetSkillLeaveRemove_2 = false; this.TargetSkillLeaveRemove_3 = false; this.RemoveSkillList = new List <BuffSkill>(); this.skillContext = null; }
public override void Init() { base.Init(); this._coordHandler = new SceneManagement.Process(this.FilterCoordActor); }
public HitTriggerDurationContext() { this._coordHandler = new SceneManagement.Process(this.FilterCoordActor); }