AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.DrawTriangle

Method  -  Static

public static void DrawTriangle(Vector2i p0, Vector2i p1, Vector2i p2, Color32 color)
public static void DrawTriangle(Vector2i p0, Vector2i p1, Vector2i p2, Color32 color, Vector2i pivot, float rotation)

Parameters

p0 Vector2i First point of the triangle
p1 Vector2i Second point of the triangle
p2 Vector2i Third point of the triangle
color Color32 Color
pivot Vector2i Rotation pivot point, specified as an offset from the rectangle's top left corner
rotation float Rotation in degrees

Returns

Nothing.

Description

Draw a triangle outline to the display with the given color. The 3 points of the triangle are defined by p0, p1, and p2.

Optionally a pivot point, and rotation angle in degrees can also be specified.

Example

void Render() {
    RB.DrawTriangle(new Vector2i(10050), new Vector2i(100100), new Vector2i(15075), Color.red));
}

See Also

RB.DrawTriangleFill

See Docs

Features - Primitives