WoopWoop-Docs
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | List of all members
WoopWoop.PolygonRenderer Class Reference

Renders a polygon with given vertices. More...

Inheritance diagram for WoopWoop.PolygonRenderer:
WoopWoop.Renderer WoopWoop.Component

Classes

class  BasicShapes
 Contains static properties for basic shapes' vertices. More...
 

Public Member Functions

override void Update (float deltaTime)
 Updates the polygon renderer.
 
- Public Member Functions inherited from WoopWoop.Component
void Attach (Entity entity)
 Attaches the component to an entity.
 
virtual void Awake ()
 Awake is called when the component is initialized, regardless of whether or not the script is enabled.
 
virtual void Start ()
 Called when the component is started if it's enabled.
 
virtual void OnEndOfFrame ()
 Called on the end of every frame.
 
virtual void Stop ()
 Called when the component is removed.
 
virtual void OnDrawGizmo ()
 Tells the renderer how to draw the object's editor gizmos.
 

Public Attributes

Vector2?[] vertices
 Vertices of the polygon.
 
float thickness = 10f
 The thickness of the polygon lines.
 
- Public Attributes inherited from WoopWoop.Renderer
Color Color = Raylib.BLACK
 The color of the renderer.
 

Private Member Functions

void DrawPolygon (int posX, int posY, Vector2[] vertices, Color color)
 

Static Private Member Functions

static Vector2[] RotateVertices (Vector2[] vertices, float angle)
 

Additional Inherited Members

- Static Protected Member Functions inherited from WoopWoop.Renderer
static Vector2 GetOriginalPositionOfTransform (Transform transform, Pivot pivot)
 Gets the original position of the transform based on the pivot.
 
- Properties inherited from WoopWoop.Renderer
byte Layer [get, set]
 The rendering layer of the renderer.
 
- Properties inherited from WoopWoop.Component
Entity entity [get, private set]
 The entity to which this component is attached.
 
Transform transform [get]
 The transform of the entity to which this component is attached.
 
bool Enabled = true [get, set]
 Determines whether the component is enabled.
 

Detailed Description

Renders a polygon with given vertices.

Member Function Documentation

◆ DrawPolygon()

void WoopWoop.PolygonRenderer.DrawPolygon ( int posX,
int posY,
Vector2[] vertices,
Color color )
private

◆ RotateVertices()

static Vector2[] WoopWoop.PolygonRenderer.RotateVertices ( Vector2[] vertices,
float angle )
staticprivate

◆ Update()

override void WoopWoop.PolygonRenderer.Update ( float deltaTime)
virtual

Updates the polygon renderer.

Parameters
deltaTimeThe time elapsed since the last update.

Reimplemented from WoopWoop.Component.

Member Data Documentation

◆ thickness

float WoopWoop.PolygonRenderer.thickness = 10f

The thickness of the polygon lines.

◆ vertices

Vector2? [] WoopWoop.PolygonRenderer.vertices

Vertices of the polygon.


The documentation for this class was generated from the following file: