View source
class flaxen.component.Position
Available on all platforms
Represents the 2D position of the entity.
Most entities that have renderable components (Image, for example) require a Position before they will display.
-
TODO: The convenience methods all rely on the stage height/width, but what if the stage resizes? Consider adding an asPercentage parameter, as it exists in Offset. Then either require the RenderingSystem to calculate the actual position at render time, or add a method that does the math in here. That has some disadvantages.
Class Fields
Instance Fields
function getAngleTo(pos:Position):Float
Returns an angle between this point and another point, degrees, 0 north