public void Enter(Action _action, Track _track)
 {
     this.hit = false;
     this.collideCountMap.Clear();
     this.collideTimeMap.Clear();
     this.type_Filters[0]   = this.bFilterHero;
     this.type_Filters[1]   = this.bFileterMonter;
     this.type_Filters[2]   = this.bFileterOrgan;
     this.type_Filters[3]   = this.bFilterEye;
     this.type_actorList[0] = this.triggerHeroList;
     this.type_actorList[1] = this.triggerMonsterList;
     this.type_actorList[2] = this.triggerOrganList;
     this.type_actorList[3] = this.triggerEyeList;
     this.triggerActor      = _action.GetActorHandle(this.triggerId);
     if (this.bUseTriggerObj)
     {
         if (!this.triggerActor)
         {
             return;
         }
         if (AGE_Helper.GetCollisionShape(this.triggerActor.get_handle()) == null)
         {
             return;
         }
     }
     this.attackActor  = _action.GetActorHandle(this.attackerId);
     this.skillContext = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
 }
        private List <PoolObjHandle <ActorRoot> > FilterTargetByTriggerRegion(Action _action, PoolObjHandle <ActorRoot> _attackActor, BaseSkill _skill)
        {
            if (!_attackActor || _skill == null)
            {
                return(null);
            }
            HitTriggerTick.targetActors.Clear();
            if (this.bFindTargetByRotateBodyBullet)
            {
                PoolObjHandle <ActorRoot> poolObjHandle = default(PoolObjHandle <ActorRoot>);
                _action.refParams.GetRefParam("FindEnemyActor", ref poolObjHandle);
                if (poolObjHandle)
                {
                    HitTriggerTick.targetActors.Add(poolObjHandle);
                }
                return(HitTriggerTick.targetActors);
            }
            PoolObjHandle <ActorRoot> targetActor = _skill.GetTargetActor();

            if (targetActor && !targetActor.handle.ActorControl.IsDeadState)
            {
                HitTriggerTick.targetActors.Add(targetActor);
            }
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.triggerId);

            if (!actorHandle)
            {
                return(HitTriggerTick.targetActors);
            }
            this.shape = AGE_Helper.GetCollisionShape(actorHandle);
            if (this.shape != null)
            {
                Singleton <TargetSearcher> .instance.BeginCollidedActorList(_attackActor, this.shape, false, true, null, this.bCheckSight);

                List <PoolObjHandle <ActorRoot> > collidedActors = Singleton <TargetSearcher> .instance.GetCollidedActors();

                if (collidedActors != null && collidedActors.get_Count() > 0)
                {
                    List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = collidedActors.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        if (HitTriggerTick.targetActors.IndexOf(enumerator.get_Current()) == -1)
                        {
                            HitTriggerTick.targetActors.Add(enumerator.get_Current());
                        }
                    }
                }
                Singleton <TargetSearcher> .instance.EndCollidedActorList();
            }
            return(HitTriggerTick.targetActors);
        }
Esempio n. 3
0
        private List <PoolObjHandle <ActorRoot> > FilterTargetByTriggerRegion(Action _action, PoolObjHandle <ActorRoot> _attackActor, BaseSkill _skill)
        {
            if ((_attackActor == 0) || (_skill == null))
            {
                return(null);
            }
            List <PoolObjHandle <ActorRoot> > list        = null;
            PoolObjHandle <ActorRoot>         targetActor = _skill.GetTargetActor();

            if ((targetActor != 0) && !targetActor.handle.ActorControl.IsDeadState)
            {
                if (list == null)
                {
                    list = new List <PoolObjHandle <ActorRoot> >();
                }
                list.Add(targetActor);
            }
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.triggerId);

            if (actorHandle != 0)
            {
                this.shape = AGE_Helper.GetCollisionShape((ActorRoot)actorHandle);
                if (this.shape == null)
                {
                    return(list);
                }
                Singleton <TargetSearcher> .instance.BeginCollidedActorList(_attackActor, this.shape, false, true, null);

                List <PoolObjHandle <ActorRoot> > collidedActors = Singleton <TargetSearcher> .instance.GetCollidedActors();

                if ((collidedActors != null) && (collidedActors.Count > 0))
                {
                    if (list == null)
                    {
                        list = new List <PoolObjHandle <ActorRoot> >();
                    }
                    List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = collidedActors.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        if (list.IndexOf(enumerator.Current) == -1)
                        {
                            list.Add(enumerator.Current);
                        }
                    }
                }
                Singleton <TargetSearcher> .instance.EndCollidedActorList();
            }
            return(list);
        }
Esempio n. 4
0
 public void Enter(AGE.Action _action, Track _track)
 {
     this.hit = false;
     this.collideCountMap.Clear();
     this.collideTimeMap.Clear();
     this.type_Filters   = new bool[] { this.bFilterHero, this.bFileterMonter, this.bFileterOrgan, this.bFilterEye };
     this.type_actorList = new List <PoolObjHandle <ActorRoot> >[] { this.triggerHeroList, this.triggerMonsterList, this.triggerOrganList, this.triggerEyeList };
     this.triggerActor   = _action.GetActorHandle(this.triggerId);
     if (this.bUseTriggerObj)
     {
         if (this.triggerActor == 0)
         {
             return;
         }
         if (AGE_Helper.GetCollisionShape(this.triggerActor.handle) == null)
         {
             return;
         }
     }
     this.attackActor = _action.GetActorHandle(this.attackerId);
 }