File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,23 +2,16 @@ var SetCenterX = require('./SetCenterX');
22var SetCenterY = require ( './SetCenterY' ) ;
33
44/**
5- * The center x coordinate of the Game Object.
6- * This is the same as `(x - offsetX) + (width / 2)`.
7- *
8- * @property {number } centerX
9- */
10-
11- /**
12- * [description]
5+ * Positions the Game Object so that it is centered on the given coordinates.
136 *
147 * @function Phaser.Display.Bounds.CenterOn
158 * @since 3.0.0
169 *
17- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
18- * @param {number } x - [description]
19- * @param {number } y - [description]
10+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object that will be re-positioned.
11+ * @param {number } x - The horizontal coordinate to position the Game Object on.
12+ * @param {number } y - The vertical coordinate to position the Game Object on.
2013 *
21- * @return {Phaser.GameObjects.GameObject } [description]
14+ * @return {Phaser.GameObjects.GameObject } The Game Object that was positioned.
2215 */
2316var CenterOn = function ( gameObject , x , y )
2417{
Original file line number Diff line number Diff line change 11/**
2- * [description]
2+ * Returns the bottom coordinate from the bounds of the Game Object.
33 *
44 * @function Phaser.Display.Bounds.GetBottom
55 * @since 3.0.0
66 *
7- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
7+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
88 *
9- * @return {number } [description]
9+ * @return {number } The bottom coordinate of the bounds of the Game Object.
1010 */
1111var GetBottom = function ( gameObject )
1212{
Original file line number Diff line number Diff line change 11/**
2- * [description]
2+ * Returns the center x coordinate from the bounds of the Game Object.
33 *
44 * @function Phaser.Display.Bounds.GetCenterX
55 * @since 3.0.0
66 *
7- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
7+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
88 *
9- * @return {number } [description]
9+ * @return {number } The center x coordinate of the bounds of the Game Object.
1010 */
1111var GetCenterX = function ( gameObject )
1212{
Original file line number Diff line number Diff line change 11/**
2- * [description]
2+ * Returns the center y coordinate from the bounds of the Game Object.
33 *
44 * @function Phaser.Display.Bounds.GetCenterY
55 * @since 3.0.0
66 *
7- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
7+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
88 *
9- * @return {number } [description]
9+ * @return {number } The center y coordinate of the bounds of the Game Object.
1010 */
1111var GetCenterY = function ( gameObject )
1212{
Original file line number Diff line number Diff line change 11/**
2- * [description]
2+ * Returns the left coordinate from the bounds of the Game Object.
33 *
44 * @function Phaser.Display.Bounds.GetLeft
55 * @since 3.0.0
66 *
7- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
7+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
88 *
9- * @return {number } [description]
9+ * @return {number } The left coordinate of the bounds of the Game Object.
1010 */
1111var GetLeft = function ( gameObject )
1212{
Original file line number Diff line number Diff line change 11/**
2- * The amount the Game Object is visually offset from its x coordinate.
3- * This is the same as `width * origin.x`.
4- * It will only be > 0 if origin.x is not equal to zero.
5- *
6- * @property {number } offsetX
7- * @readOnly
8- */
9-
2+ * Returns the amount the Game Object is visually offset from its x coordinate.
3+ * This is the same as `width * origin.x`.
4+ * This value will only be > 0 if `origin.x` is not equal to zero.
5+ *
6+ * @function Phaser.Display.Bounds.GetOffsetX
7+ * @since 3.0.0
8+ *
9+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
10+ *
11+ * @return {number } The horizontal offset of the Game Object.
12+ */
1013var GetOffsetX = function ( gameObject )
1114{
1215 return gameObject . width * gameObject . originX ;
Original file line number Diff line number Diff line change 11/**
2- * The amount the Game Object is visually offset from its x coordinate.
3- * This is the same as `width * origin.x`.
4- * It will only be > 0 if origin.x is not equal to zero.
5- *
6- * @property {number } offsetX
7- * @readOnly
8- */
9-
2+ * Returns the amount the Game Object is visually offset from its y coordinate.
3+ * This is the same as `width * origin.y`.
4+ * This value will only be > 0 if `origin.y` is not equal to zero.
5+ *
6+ * @function Phaser.Display.Bounds.GetOffsetY
7+ * @since 3.0.0
8+ *
9+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
10+ *
11+ * @return {number } The vertical offset of the Game Object.
12+ */
1013var GetOffsetY = function ( gameObject )
1114{
1215 return gameObject . height * gameObject . originY ;
Original file line number Diff line number Diff line change 11/**
2- * [description]
2+ * Returns the right coordinate from the bounds of the Game Object.
33 *
44 * @function Phaser.Display.Bounds.GetRight
55 * @since 3.0.0
66 *
7- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
7+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
88 *
9- * @return {number } [description]
9+ * @return {number } The right coordinate of the bounds of the Game Object.
1010 */
1111var GetRight = function ( gameObject )
1212{
Original file line number Diff line number Diff line change 11/**
2- * [description]
2+ * Returns the top coordinate from the bounds of the Game Object.
33 *
44 * @function Phaser.Display.Bounds.GetTop
55 * @since 3.0.0
66 *
7- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
7+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object to get the bounds value from.
88 *
9- * @return {number } [description]
9+ * @return {number } The top coordinate of the bounds of the Game Object.
1010 */
1111var GetTop = function ( gameObject )
1212{
Original file line number Diff line number Diff line change 11/**
2- * [description]
2+ * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate.
33 *
44 * @function Phaser.Display.Bounds.SetBottom
55 * @since 3.0.0
66 *
7- * @param {Phaser.GameObjects.GameObject } gameObject - [description]
8- * @param {number } value - [description]
7+ * @param {Phaser.GameObjects.GameObject } gameObject - The Game Object that will be re-positioned.
8+ * @param {number } value - The coordinate to position the Game Object bounds on.
99 *
10- * @return {Phaser.GameObjects.GameObject } [description]
10+ * @return {Phaser.GameObjects.GameObject } The Game Object that was positioned.
1111 */
1212var SetBottom = function ( gameObject , value )
1313{
You can’t perform that action at this time.
0 commit comments