Static methods
staticinlineget(x:Float = 0, y:Float = 0, sides:Int = 3, radius:Float = 1, rotation:Float = 0, scale_x:Float = 1, scale_y:Float = 1):Polygon
Gets a Polygon from the pool, or creates a new one if none are available. Call put()
on the Polygon to place it back in the pool.
Parameters:
x | |
---|---|
y | |
sides | |
radius | |
rotation |
Returns:
Polygon
staticinlineget_from_rect(rect:Rect):Polygon
Gets a Polygon from the pool, or creates a new one if none are available. Call put()
on the Polygon to place it back in the pool.
Parameters:
rect |
---|
Returns:
Polygon return _pool.get().set_from_rect(rect)
staticinlineget_from_vertices(x:Float = 0, y:Float = 0, rotation:Float = 0, ?vertices:Array<Vector2>, scale_x:Float = 1, scale_y:Float = 1):Polygon
Gets a Polygon from the pool, or creates a new one if none are available. Call put()
on the Polygon to place it back in the pool.
Parameters:
x | |
---|---|
y | |
rotation | |
vertices |
Returns:
Polygon