OverlayShapes
namespace Griff.Runtime;
public static class OverlayShapesShapes and colors the genres’ overlays and HUDs draw with, belonging to the screen rather than any entity.
Methods
Section titled “Methods”Circle
Section titled “Circle”public static IEnumerable<SpriteDraw> Circle(Vector2 center, float radius, float thickness, Color color)The outline of a circle (see Circle).
public static Vector2 Flat(Vector3 v)A position in 3D without its height: the 2D point the world draws it at.
HealthColor
Section titled “HealthColor”public static Color HealthColor(float fraction)The color a health bar fills with: Mine while healthy, Neutral while hurt, Theirs when nearly gone.
public static SpriteDraw Label(string text, Vector2 at, float size, Color color, TextAlign align)Text drawn at a position (see Label).
LineDraw
Section titled “LineDraw”public static SpriteDraw LineDraw(Vector2 from, Vector2 to, float thickness, Color color)A line between two points (see Line).
public static IEnumerable<SpriteDraw> Meter(Vector2 center, float width, float height, float fraction, Color fill)A bar: dark behind, filled from the left by fraction.
Outline
Section titled “Outline”public static IEnumerable<SpriteDraw> Outline(Vector2 center, Vector2 size, float thickness, Color color)The outline of a rectangle (see Outline).
public static SpriteDraw Quad(Vector2 center, Vector2 size, Color color)A solid rectangle in the world.
Fields
Section titled “Fields”HudBack
Section titled “HudBack”public static readonly Color HudBackThe dark background of a HUD panel.
HudDim
Section titled “HudDim”public static readonly Color HudDimThe color of a HUD’s less important text.
HudEdge
Section titled “HudEdge”public static readonly Color HudEdgeThe edge of a HUD panel.
HudText
Section titled “HudText”public static readonly Color HudTextThe color of a HUD’s text.
public static readonly Color MineThe color of what is the player’s own.
Neutral
Section titled “Neutral”public static readonly Color NeutralThe color of what belongs to no one, or is half-way between good and bad.
Theirs
Section titled “Theirs”public static readonly Color TheirsThe color of what belongs to an opponent.