Example #1
0
        public override bool contains(CHitShape otherShape)
        {
            switch (otherShape.shape)
            {
            case shapeType.circle:

                if ((Math.Sqrt(Math.Pow(position.X - otherShape.position.X, 2) + Math.Pow(position.Y - otherShape.position.Y, 2))) <
                    radius + ((CHitSphere)otherShape).radius)
                {
                    return(true);
                }
                break;

            case shapeType.box:
                break;
            }

            return(false);
        }
Example #2
0
        public override bool contains(CHitShape otherShape)
        {
            switch (otherShape.shape)
            {
                case shapeType.circle:

                    if ( (Math.Sqrt(Math.Pow(position.X - otherShape.position.X,2) + Math.Pow(position.Y - otherShape.position.Y,2))) <
                        radius + ((CHitSphere)otherShape).radius)
                    {
                        return true;
                    }
                    break;

                case shapeType.box:
                    break;
            }

            return false;
        }
Example #3
0
 public abstract bool contains(CHitShape otherShape);
Example #4
0
 public abstract bool contains(CHitShape otherShape);