Example #1
0
        public bool istouchingwall(wall w)
        {
            PointF nearest  = w.pointnearestto(this);
            float  distance = (float)Math.Sqrt((nearest.X - this.location.X) * (nearest.X - this.location.X)
                                               + (nearest.Y - this.location.Y) * (nearest.Y - this.location.Y));

            return(this.radius > distance);
        }
Example #2
0
 public virtual void hitwall(wall w)
 {
     bouncefrom(w.pointnearestto(this));
 }