示例#1
0
 /// <summary>
 /// Checks if the <paramref name="spatial"/> is standing on this <see cref="WallEntityBase"/>.
 /// </summary>
 /// <param name="spatial">The <see cref="ISpatial"/> to check if standing on this <see cref="WallEntityBase"/>.</param>
 /// <returns>True if the <paramref name="spatial"/> is standing on this <see cref="WallEntityBase"/>; otherwise
 /// false.</returns>
 public bool IsEntityStandingOn(ISpatial spatial)
 {
     var rect = spatial.GetStandingAreaRect();
     return this.Intersects(rect);
 }
示例#2
0
 /// <summary>
 /// Checks if the <paramref name="spatial"/> is standing on this <see cref="WallEntityBase"/>.
 /// </summary>
 /// <param name="spatial">The <see cref="ISpatial"/> to check if standing on this <see cref="WallEntityBase"/>.</param>
 /// <returns>True if the <paramref name="spatial"/> is standing on this <see cref="WallEntityBase"/>; otherwise false.</returns>
 public static bool IsEntityStandingOn(ISpatial wall, ISpatial spatial)
 {
     var rect = spatial.GetStandingAreaRect();
     return wall.Intersects(rect);
 }
示例#3
0
        /// <summary>
        /// Checks if the <paramref name="spatial"/> is standing on this <see cref="WallEntityBase"/>.
        /// </summary>
        /// <param name="spatial">The <see cref="ISpatial"/> to check if standing on this <see cref="WallEntityBase"/>.</param>
        /// <returns>True if the <paramref name="spatial"/> is standing on this <see cref="WallEntityBase"/>; otherwise false.</returns>
        public static bool IsEntityStandingOn(ISpatial wall, ISpatial spatial)
        {
            var rect = spatial.GetStandingAreaRect();

            return(wall.Intersects(rect));
        }