Exemple #1
0
        // Token: 0x06000068 RID: 104 RVA: 0x000070DC File Offset: 0x000052DC
        public eCollitionNode GetCollided(Ray BBS, float RL)
        {
            eCollitionNode IsC  = null;
            bool           flag = this.Type1 == eCollitionNode.Type.BoundingSphere;

            if (flag)
            {
                bool flag2 = this.BS.Intersects(BBS) != null;
                if (flag2)
                {
                    bool flag3 = Vector3.Distance(this.BS.Center, BBS.Position) < RL;
                    if (flag3)
                    {
                        bool flag4 = this.LowerNodes.Count > 0;
                        if (flag4)
                        {
                            foreach (eCollitionNode LN in this.LowerNodes)
                            {
                                eCollitionNode CCN   = LN.GetCollided(BBS, RL);
                                bool           flag5 = !Information.IsNothing(CCN);
                                if (flag5)
                                {
                                    IsC = CCN;
                                }
                            }
                        }
                        else
                        {
                            IsC = this;
                        }
                    }
                }
                else
                {
                    IsC = null;
                }
            }
            else
            {
                bool flag6 = this.Type1 == eCollitionNode.Type.BoundingBox;
                if (flag6)
                {
                    bool flag7 = this.BB.Intersects(BBS) != null;
                    if (flag7)
                    {
                        IsC = this;
                    }
                    else
                    {
                        IsC = null;
                    }
                }
                else
                {
                    bool flag8 = this.Type1 == eCollitionNode.Type.Ray;
                    if (flag8)
                    {
                        IsC = null;
                    }
                    else
                    {
                        bool flag9 = this.Type1 == eCollitionNode.Type.BoundingFrustum;
                        if (flag9)
                        {
                            bool flag10 = this.BF.Intersects(BBS) != null;
                            if (flag10)
                            {
                                IsC = this;
                            }
                            else
                            {
                                IsC = null;
                            }
                        }
                        else
                        {
                            bool flag11 = this.Type1 == eCollitionNode.Type.Plane;
                            if (flag11)
                            {
                                IsC = this;
                            }
                            else
                            {
                                IsC = null;
                            }
                        }
                    }
                }
            }
            return(IsC);
        }