Polycode
|
A 2D line between two points or two ScreenEntity instances. More...
Inherits Polycode::ScreenMesh.
Public Member Functions | |
ScreenLine (Vector2 *start, Vector2 *end) | |
Create a line between two points. | |
ScreenLine (ScreenEntity *target1, ScreenEntity *target2) | |
Create a line between two entities. | |
void | Update () |
Main update method. | |
void | Render () |
Main render method. | |
void | setLineWidth (Number width) |
Sets the line width. |
A 2D line between two points or two ScreenEntity instances.
Create a line between two points.
Starting point. Enfing point.
ScreenLine::ScreenLine | ( | ScreenEntity * | target1, |
ScreenEntity * | target2 | ||
) |
Create a line between two entities.
It's automatically updated every frame to follow the entities. Starting target. Ending target.
void ScreenLine::Render | ( | ) | [virtual] |
void ScreenLine::setLineWidth | ( | Number | width | ) |
Sets the line width.
width | New line width. |
void ScreenLine::Update | ( | ) | [virtual] |
Main update method.
Override this to do your updates before the render cycle.
Reimplemented from Polycode::Entity.