Beispiel #1
0
        public bool boxColChek(BoundingBoxComp colliderA, BoundingBoxComp colliderB)
        {
            result  = false;
            minPosA = colliderA.min + colliderA.gameObject.GetTransform().Position;
            maxPosA = colliderA.max + colliderA.gameObject.GetTransform().Position;
            minPosB = colliderB.min + colliderB.gameObject.GetTransform().Position;
            maxPosB = colliderB.max + colliderB.gameObject.GetTransform().Position;

            if (maxPosA.X < minPosB.X || minPosA.X > maxPosB.X)
            {
                return(result);
            }
            if (maxPosA.Y < minPosB.Y || minPosA.Y > maxPosB.Y)
            {
                return(result);
            }
            return(result = true);
        }
Beispiel #2
0
 public bool cirlBoxChek(CircleBoundingComp circColliderA, BoundingBoxComp boxColliderB)
 {
     return(true);
 }