/// <summary> /// Draws a TeleportEntity. /// </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="tele">TeleportEntity to draw.</param> public static void Draw(ISpriteBatch sb, ICamera2D camera, TeleportEntityBase tele) { // Draw the source rectangle Draw(sb, tele, _teleSourceColor); // Draw the destination rectangle and the arrow pointing to it only if the map is the same if (camera.Map != null && camera.Map.ID == tele.DestinationMap) { Draw(sb, tele.Destination, tele.Size, _teleDestColor); // Arrow var centerOffset = tele.Size / 2; RenderArrow.Draw(sb, tele.Position + centerOffset, tele.Destination + centerOffset, _arrowColor); } }