getPoint(position, out) → {Phaser.Point}
Returns a point based on the given position constant, which can be one of:
Phaser.TOP_LEFT
, Phaser.TOP_CENTER
, Phaser.TOP_RIGHT
, Phaser.LEFT_CENTER
,Phaser.CENTER
, Phaser.RIGHT_CENTER
, Phaser.BOTTOM_LEFT
, Phaser.BOTTOM_CENTER
and Phaser.BOTTOM_RIGHT
.
This method returns the same values as calling Rectangle.bottomLeft, etc, but those
calls always create a new Point object, where-as this one allows you to use your own.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
position | integer | <optional> | One of the Phaser position constants, such as |
out | Phaser.Point | <optional> | A Phaser.Point that the values will be set in. |
Returns
An object containing the point in its x
and y
properties.
- Source code: geom/Rectangle.js (Line 386)
Please login to continue.