Beispiel #1
0
        public static void Draw(ISpriteBatch sb, ICamera2D camera, WallEntityBase wall, Vector2 offset)
        {
            // Find the positon to draw to
            var p    = wall.Position + offset;
            var dest = new Rectangle((int)p.X, (int)p.Y, (int)wall.Size.X, (int)wall.Size.Y);

            // Draw the collision area
            RenderRectangle.Draw(sb, dest, _wallColor);
        }
Beispiel #2
0
 /// <summary>
 /// Draws a WallEntity.
 /// </summary>
 /// <param name="sb"><see cref="ISpriteBatch"/> to draw to.</param>
 /// <param name="camera">The <see cref="ICamera2D"/> that describes the current view.</param>
 /// <param name="wall">WallEntity to draw.</param>
 public static void Draw(ISpriteBatch sb, ICamera2D camera, WallEntityBase wall)
 {
     Draw(sb, camera, wall, Vector2.Zero);
 }
Beispiel #3
0
 public static void Draw(ISpriteBatch sb, ICamera2D camera, WallEntityBase wall, Vector2 offset)
 {
     Draw(sb, wall, _wallColor, border: false);
 }
Beispiel #4
0
 /// <summary>
 /// Gets the string to display for an item.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <returns>The string to display.</returns>
 static string GetDrawString(WallEntityBase item)
 {
     return(string.Format("({0},{1}) [{2}x{3}]{4}", item.Position.X, item.Position.Y, item.Size.X, item.Size.Y,
                          item.IsPlatform ? " - Platform" : string.Empty));
 }