コード例 #1
0
        // Token: 0x0600106D RID: 4205 RVA: 0x00052584 File Offset: 0x00050784
        private Func <HurtBox, BullseyeSearch.CandidateInfo> GetSelector()
        {
            bool getDot         = this.filterByAngle;
            bool getDistanceSqr = this.filterByDistance;

            getDistanceSqr |= (this.sortMode == BullseyeSearch.SortMode.Distance || this.sortMode == BullseyeSearch.SortMode.DistanceAndAngle);
            getDot         |= (this.sortMode == BullseyeSearch.SortMode.Angle || this.sortMode == BullseyeSearch.SortMode.DistanceAndAngle);
            bool getDifference = getDot | getDistanceSqr;
            bool getPosition   = (getDot | getDistanceSqr) || this.filterByLoS;

            return(delegate(HurtBox hurtBox)
            {
                BullseyeSearch.CandidateInfo candidateInfo = new BullseyeSearch.CandidateInfo
                {
                    hurtBox = hurtBox
                };
                if (getPosition)
                {
                    candidateInfo.position = hurtBox.transform.position;
                }
                Vector3 vector = default(Vector3);
                if (getDifference)
                {
                    vector = candidateInfo.position - this.searchOrigin;
                }
                if (getDot)
                {
                    candidateInfo.dot = Vector3.Dot(this.searchDirection, vector.normalized);
                }
                if (getDistanceSqr)
                {
                    candidateInfo.distanceSqr = vector.sqrMagnitude;
                }
                return candidateInfo;
            });
        }
コード例 #2
0
 private bool <RefreshCandidates> g__DotOkay | 25_1 (BullseyeSearch.CandidateInfo candidateInfo)
 {
     return(this.minThetaDot <= candidateInfo.dot && candidateInfo.dot <= this.maxThetaDot);
 }