Exemple #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);
        }
        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;
        }
Exemple #3
0
 public abstract bool contains(CHitShape otherShape);
Exemple #4
0
 public abstract bool contains(CHitShape otherShape);