Adding jsdocs

This commit is contained in:
Richard Davey 2017-10-12 01:24:01 +01:00
parent 4ea560cb34
commit bdbf2a1f96
36 changed files with 414 additions and 83 deletions

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetCenterX = require('../../bounds/SetCenterX'); var SetCenterX = require('../../bounds/SetCenterX');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.In.BottomCenter
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX] - [description]
* @param {number} [offsetY] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var BottomCenter = function (gameObject, container, offsetX, offsetY) var BottomCenter = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.In.BottomLeft
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX] - [description]
* @param {number} [offsetY] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var BottomLeft = function (gameObject, container, offsetX, offsetY) var BottomLeft = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.In.BottomRight
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX] - [description]
* @param {number} [offsetY] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var BottomRight = function (gameObject, container, offsetX, offsetY) var BottomRight = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -2,6 +2,19 @@ var GetCenterX = require('../../bounds/GetCenterX');
var GetCenterY = require('../../bounds/GetCenterY'); var GetCenterY = require('../../bounds/GetCenterY');
var CenterOn = require('../../bounds/CenterOn'); var CenterOn = require('../../bounds/CenterOn');
/**
* [description]
*
* @function Phaser.Display.Align.In.Center
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var Center = function (gameObject, container, offsetX, offsetY) var Center = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetCenterY = require('../../bounds/SetCenterY'); var SetCenterY = require('../../bounds/SetCenterY');
/**
* [description]
*
* @function Phaser.Display.Align.In.LeftCenter
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var LeftCenter = function (gameObject, container, offsetX, offsetY) var LeftCenter = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetCenterY = require('../../bounds/SetCenterY'); var SetCenterY = require('../../bounds/SetCenterY');
/**
* [description]
*
* @function Phaser.Display.Align.In.RightCenter
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var RightCenter = function (gameObject, container, offsetX, offsetY) var RightCenter = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetCenterX = require('../../bounds/SetCenterX'); var SetCenterX = require('../../bounds/SetCenterX');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.In.TopCenter
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var TopCenter = function (gameObject, container, offsetX, offsetY) var TopCenter = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.In.TopLeft
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var TopLeft = function (gameObject, container, offsetX, offsetY) var TopLeft = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.In.TopRight
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var TopRight = function (gameObject, container, offsetX, offsetY) var TopRight = function (gameObject, container, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetCenterX = require('../../bounds/SetCenterX'); var SetCenterX = require('../../bounds/SetCenterX');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.To.BottomCenter
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var BottomCenter = function (gameObject, parent, offsetX, offsetY) var BottomCenter = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.To.BottomLeft
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var BottomLeft = function (gameObject, parent, offsetX, offsetY) var BottomLeft = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.To.BottomRight
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var BottomRight = function (gameObject, parent, offsetX, offsetY) var BottomRight = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.To.LeftBottom
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var LeftBottom = function (gameObject, parent, offsetX, offsetY) var LeftBottom = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetCenterY = require('../../bounds/SetCenterY'); var SetCenterY = require('../../bounds/SetCenterY');
/**
* [description]
*
* @function Phaser.Display.Align.To.LeftCenter
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var LeftCenter = function (gameObject, parent, offsetX, offsetY) var LeftCenter = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.To.LeftTop
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var LeftTop = function (gameObject, parent, offsetX, offsetY) var LeftTop = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.To.RightBottom
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var RightBottom = function (gameObject, parent, offsetX, offsetY) var RightBottom = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetCenterY = require('../../bounds/SetCenterY'); var SetCenterY = require('../../bounds/SetCenterY');
/**
* [description]
*
* @function Phaser.Display.Align.To.RightTop
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var RightTop = function (gameObject, parent, offsetX, offsetY) var RightTop = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetTop = require('../../bounds/SetTop'); var SetTop = require('../../bounds/SetTop');
/**
* [description]
*
* @function Phaser.Display.Align.To.RightTop
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var RightTop = function (gameObject, parent, offsetX, offsetY) var RightTop = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetCenterX = require('../../bounds/SetCenterX'); var SetCenterX = require('../../bounds/SetCenterX');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.To.TopCenter
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var TopCenter = function (gameObject, parent, offsetX, offsetY) var TopCenter = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetLeft = require('../../bounds/SetLeft'); var SetLeft = require('../../bounds/SetLeft');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.To.TopLeft
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var TopLeft = function (gameObject, parent, offsetX, offsetY) var TopLeft = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop');
var SetRight = require('../../bounds/SetRight'); var SetRight = require('../../bounds/SetRight');
var SetBottom = require('../../bounds/SetBottom'); var SetBottom = require('../../bounds/SetBottom');
/**
* [description]
*
* @function Phaser.Display.Align.To.TopRight
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {Phaser.GameObjects.GameObject} container - [description]
* @param {number} [offsetX=0] - [description]
* @param {number} [offsetY=0] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var TopRight = function (gameObject, parent, offsetX, offsetY) var TopRight = function (gameObject, parent, offsetX, offsetY)
{ {
if (offsetX === undefined) { offsetX = 0; } if (offsetX === undefined) { offsetX = 0; }

View file

@ -8,6 +8,18 @@ var SetCenterY = require('./SetCenterY');
* @property {number} centerX * @property {number} centerX
*/ */
/**
* [description]
*
* @function Phaser.Display.Bounds.CenterOn
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {number} x - [description]
* @param {number} y - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var CenterOn = function (gameObject, x, y) var CenterOn = function (gameObject, x, y)
{ {
SetCenterX(gameObject, x); SetCenterX(gameObject, x);

View file

@ -1,10 +1,13 @@
/** /**
* The left coordinate of the Game Object. * [description]
* This is the same as `x - offsetX`. *
* * @function Phaser.Display.Bounds.GetBottom
* @property {number} left * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
*
* @return {number} [description]
*/
var GetBottom = function (gameObject) var GetBottom = function (gameObject)
{ {
return (gameObject.y + gameObject.height) - (gameObject.height * gameObject.originY); return (gameObject.y + gameObject.height) - (gameObject.height * gameObject.originY);

View file

@ -1,10 +1,13 @@
/** /**
* The center x coordinate of the Game Object. * [description]
* This is the same as `(x - offsetX) + (width / 2)`. *
* * @function Phaser.Display.Bounds.GetCenterX
* @property {number} centerX * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
*
* @return {number} [description]
*/
var GetCenterX = function (gameObject) var GetCenterX = function (gameObject)
{ {
return gameObject.x - (gameObject.width * gameObject.originX) + (gameObject.width * 0.5); return gameObject.x - (gameObject.width * gameObject.originX) + (gameObject.width * 0.5);

View file

@ -1,10 +1,13 @@
/** /**
* The center x coordinate of the Game Object. * [description]
* This is the same as `(x - offsetX) + (width / 2)`. *
* * @function Phaser.Display.Bounds.GetCenterY
* @property {number} centerX * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
*
* @return {number} [description]
*/
var GetCenterY = function (gameObject) var GetCenterY = function (gameObject)
{ {
return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5);

View file

@ -1,10 +1,13 @@
/** /**
* The left coordinate of the Game Object. * [description]
* This is the same as `x - offsetX`. *
* * @function Phaser.Display.Bounds.GetLeft
* @property {number} left * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
*
* @return {number} [description]
*/
var GetLeft = function (gameObject) var GetLeft = function (gameObject)
{ {
return gameObject.x - (gameObject.width * gameObject.originX); return gameObject.x - (gameObject.width * gameObject.originX);

View file

@ -1,10 +1,13 @@
/** /**
* The left coordinate of the Game Object. * [description]
* This is the same as `x - offsetX`. *
* * @function Phaser.Display.Bounds.GetRight
* @property {number} left * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
*
* @return {number} [description]
*/
var GetRight = function (gameObject) var GetRight = function (gameObject)
{ {
return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX); return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX);

View file

@ -1,10 +1,13 @@
/** /**
* The y coordinate of the Game Object. * [description]
* This is the same as `y - offsetY`. *
* * @function Phaser.Display.Bounds.GetTop
* @property {number} top * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
*
* @return {number} [description]
*/
var GetTop = function (gameObject) var GetTop = function (gameObject)
{ {
return gameObject.y - (gameObject.height * gameObject.originY); return gameObject.y - (gameObject.height * gameObject.originY);

View file

@ -1,10 +1,14 @@
/** /**
* The left coordinate of the Game Object. * [description]
* This is the same as `x - offsetX`. *
* * @function Phaser.Display.Bounds.SetBottom
* @property {number} left * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {number} value - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var SetBottom = function (gameObject, value) var SetBottom = function (gameObject, value)
{ {
gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY);

View file

@ -1,15 +1,14 @@
/** /**
* The center x coordinate of the Game Object. * [description]
* This is the same as `(x - offsetX) + (width / 2)`. *
* * @function Phaser.Display.Bounds.SetCenterX
* @property {number} centerX * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
// Phaser.Utils.Bounds.GetCenterX(bob) * @param {number} x - [description]
// Phaser.Utils.Bounds.CenterOn(bob, x, y) *
// Phaser.Utils.Bounds.CenterX(bob, x) * @return {Phaser.GameObjects.GameObject} [description]
// Phaser.Utils.Bounds.CenterY(bob, x) */
var SetCenterX = function (gameObject, x) var SetCenterX = function (gameObject, x)
{ {
var offsetX = gameObject.width * gameObject.originX; var offsetX = gameObject.width * gameObject.originX;

View file

@ -1,15 +1,14 @@
/** /**
* The center x coordinate of the Game Object. * [description]
* This is the same as `(x - offsetX) + (width / 2)`. *
* * @function Phaser.Display.Bounds.SetCenterY
* @property {number} centerX * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
// Phaser.Utils.Bounds.GetCenterX(bob) * @param {number} y - [description]
// Phaser.Utils.Bounds.CenterOn(bob, x, y) *
// Phaser.Utils.Bounds.CenterX(bob, x) * @return {Phaser.GameObjects.GameObject} [description]
// Phaser.Utils.Bounds.CenterY(bob, x) */
var SetCenterY = function (gameObject, y) var SetCenterY = function (gameObject, y)
{ {
var offsetY = gameObject.height * gameObject.originY; var offsetY = gameObject.height * gameObject.originY;

View file

@ -1,10 +1,14 @@
/** /**
* The left coordinate of the Game Object. * [description]
* This is the same as `x - offsetX`. *
* * @function Phaser.Display.Bounds.SetLeft
* @property {number} left * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {number} value - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var SetLeft = function (gameObject, value) var SetLeft = function (gameObject, value)
{ {
gameObject.x = value + (gameObject.width * gameObject.originX); gameObject.x = value + (gameObject.width * gameObject.originX);

View file

@ -1,10 +1,14 @@
/** /**
* The left coordinate of the Game Object. * [description]
* This is the same as `x - offsetX`. *
* * @function Phaser.Display.Bounds.SetRight
* @property {number} left * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {number} value - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var SetRight = function (gameObject, value) var SetRight = function (gameObject, value)
{ {
gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX); gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX);

View file

@ -1,10 +1,14 @@
/** /**
* The y coordinate of the Game Object. * [description]
* This is the same as `y - offsetY`. *
* * @function Phaser.Display.Bounds.SetTop
* @property {number} top * @since 3.0.0
*/ *
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
* @param {number} value - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
var SetTop = function (gameObject, value) var SetTop = function (gameObject, value)
{ {
gameObject.y = value + (gameObject.height * gameObject.originY); gameObject.y = value + (gameObject.height * gameObject.originY);

View file

@ -1,5 +1,19 @@
var ComponentToHex = require('./ComponentToHex'); var ComponentToHex = require('./ComponentToHex');
/**
* [description]
*
* @function Phaser.Display.Color.RGBToString
* @since 3.0.0
*
* @param {integer} r - [description]
* @param {integer} g - [description]
* @param {integer} b - [description]
* @param {integer} [a=255] - [description]
* @param {string} [prefix=#] - [description]
*
* @return {string} [description]
*/
var RGBToString = function (r, g, b, a, prefix) var RGBToString = function (r, g, b, a, prefix)
{ {
if (a === undefined) { a = 255; } if (a === undefined) { a = 255; }

View file

@ -1,4 +1,4 @@
// Phaser.Graphics.Color // Phaser.Display.Color
var Color = require('./Color'); var Color = require('./Color');