예제 #1
0
        // Token: 0x06000065 RID: 101 RVA: 0x00006C78 File Offset: 0x00004E78
        public bool IsCollided(BoundingSphere BBS)
        {
            bool IsC  = false;
            bool flag = this.Type1 == eCollitionNode.Type.BoundingSphere;

            if (flag)
            {
                bool flag2 = this.BS.Intersects(BBS);
                if (flag2)
                {
                    bool flag3 = this.LowerNodes.Count > 0;
                    if (flag3)
                    {
                        foreach (eCollitionNode LN in this.LowerNodes)
                        {
                            bool flag4 = LN.IsCollided(BBS);
                            if (flag4)
                            {
                                IsC = true;
                            }
                        }
                    }

                    else
                    {
                        IsC = true;
                    }
                }
                else
                {
                    IsC = false;
                }
            }
            else
            {
                bool flag5 = this.Type1 == eCollitionNode.Type.BoundingBox;
                if (flag5)
                {
                    bool flag6 = this.BB.Intersects(BBS);
                    IsC = flag6;
                }
                else
                {
                    bool flag7 = this.Type1 == eCollitionNode.Type.Ray;
                    if (flag7)
                    {
                        bool flag8 = this.RR.Intersects(BBS) != null;
                        if (flag8)
                        {
                            bool flag9 = this.LowerNodes.Count > 0;
                            if (flag9)
                            {
                                foreach (eCollitionNode LN2 in this.LowerNodes)
                                {
                                    bool flag10 = LN2.IsCollided(BBS);
                                    if (flag10)
                                    {
                                        IsC = true;
                                    }
                                }
                            }
                            else
                            {
                                IsC = true;
                            }
                        }
                        else
                        {
                            IsC = false;
                        }
                    }
                    else
                    {
                        bool flag11 = this.Type1 == eCollitionNode.Type.BoundingFrustum;
                        if (flag11)
                        {
                            bool flag12 = this.BF.Intersects(BBS);
                            IsC = flag12;
                        }
                        else
                        {
                            bool flag13 = this.Type1 == eCollitionNode.Type.Plane;
                            if (flag13)
                            {
                                bool flag14 = this.PL.Intersects(BBS) == PlaneIntersectionType.Intersecting;
                                IsC = flag14;
                            }
                            else
                            {
                                IsC = false;
                            }
                        }
                    }
                }
            }
            return(IsC);
        }
예제 #2
0
        // Token: 0x06000067 RID: 103 RVA: 0x00006F60 File Offset: 0x00005160
        public bool IsCollided(Ray BBS, float RL)
        {
            bool IsC  = false;
            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)
                            {
                                bool flag5 = LN.IsCollided(BBS, RL);
                                if (flag5)
                                {
                                    IsC = true;
                                }
                            }
                        }
                        else
                        {
                            IsC = true;
                        }
                    }
                }
                else
                {
                    IsC = false;
                }
            }
            else
            {
                bool flag6 = this.Type1 == eCollitionNode.Type.BoundingBox;
                if (flag6)
                {
                    bool flag7 = this.BB.Intersects(BBS) != null;
                    IsC = flag7;
                }
                else
                {
                    bool flag8 = this.Type1 == eCollitionNode.Type.Ray;
                    if (flag8)
                    {
                        IsC = false;
                    }
                    else
                    {
                        bool flag9 = this.Type1 == eCollitionNode.Type.BoundingFrustum;
                        if (flag9)
                        {
                            bool flag10 = this.BF.Intersects(BBS) != null;
                            IsC = flag10;
                        }
                        else
                        {
                            bool flag11 = this.Type1 == eCollitionNode.Type.Plane;
                            IsC = (flag11 && false);
                        }
                    }
                }
            }
            return(IsC);
        }