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));
        }
Пример #2
0
        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));
        }
Пример #4
0
        private void OnClickBattleScene(CUIEvent uievent)
        {
            float num;
            Ray   ray = Camera.main.ScreenPointToRay((Vector3)uievent.m_pointerEventData.position);

            this._clickPickHeroID = 0;
            if (this._pickPlane.Raycast(ray, out num))
            {
                Vector3         point    = ray.GetPoint(num);
                SceneManagement instance = Singleton <SceneManagement> .GetInstance();

                SceneManagement.Coordinate coord = new SceneManagement.Coordinate();
                VInt3 num2 = (VInt3)point;
                instance.GetCoord_Center(ref coord, num2.xz, 0xbb8);
                instance.UpdateDirtyNodes();
                instance.ForeachActorsBreak(coord, new SceneManagement.Process_Bool(this.TrySearchHero));
                if (this._clickPickHeroID > 0)
                {
                    this.PickHero(this._clickPickHeroID);
                }
            }
        }
Пример #5
0
        private void OnClickBattleScene(CUIEvent uievent)
        {
            Ray ray = Camera.main.ScreenPointToRay(uievent.m_pointerEventData.position);

            this._clickPickHeroID = 0u;
            float distance;

            if (this._pickPlane.Raycast(ray, out distance))
            {
                Vector3         point    = ray.GetPoint(distance);
                SceneManagement instance = Singleton <SceneManagement> .GetInstance();

                SceneManagement.Coordinate coord = default(SceneManagement.Coordinate);
                instance.GetCoord_Center(ref coord, ((VInt3)point).get_xz(), 3000);
                instance.UpdateDirtyNodes();
                instance.ForeachActorsBreak(coord, new SceneManagement.Process_Bool(this.TrySearchHero));
                if (this._clickPickHeroID > 0u)
                {
                    this.PickHero(this._clickPickHeroID);
                }
            }
        }