Esempio n. 1
0
        // Token: 0x06000081 RID: 129 RVA: 0x00007B8C File Offset: 0x00005D8C
        public AITargetMode CheckAndLockTargetForSee(Entity at)
        {
            bool flag = !(at == this);

            if (flag)
            {
                bool flag2 = !at.IsDead;
                if (flag2)
                {
                    EntityRelationMode Rel = this.ChekRelation(at);
                    bool flag3             = this.eType.TargetSelectingRulesForDetection.ContainsKey(Rel);
                    if (flag3)
                    {
                        AITargetMode TTargetMode = this.eType.TargetSelectingRulesForDetection[Rel];
                        bool         flag4       = TTargetMode > AITargetMode.None;
                        if (flag4)
                        {
                            this.LockTarget(at, TTargetMode, 600);
                        }
                        return(TTargetMode);
                    }
                }
            }
            return(AITargetMode.None);
        }
Esempio n. 2
0
        // Token: 0x0600008A RID: 138 RVA: 0x000080D8 File Offset: 0x000062D8
        public Entity[] NearEntities(float radius, EntityRelationMode Relation)
        {
            List <Entity> Nearests = new List <Entity>();
            float         r        = radius * radius;


            foreach (Entity e in Ground.CStack.eList)
            {
                bool flag = e != this;
                if (flag)
                {
                    bool flag2 = Vector3.DistanceSquared(this.Position, e.Position) < r && e.ChekRelation(this) == Relation;
                    if (flag2)
                    {
                        Nearests.Add(e);
                    }
                }
            }


            return(Nearests.ToArray());
        }