Add generic type on Actions

This commit is contained in:
orblazer 2018-03-27 13:14:08 +02:00
parent 1f44366bc7
commit bdf373b6e8
49 changed files with 145 additions and 46 deletions

View file

@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.Angle * @function Phaser.Actions.Angle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `angle` property. * @param {number} value - The amount to be added to the `angle` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var Angle = function (items, value, step, index, direction) var Angle = function (items, value, step, index, direction)
{ {

View file

@ -16,11 +16,13 @@
* @function Phaser.Actions.Call * @function Phaser.Actions.Call
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {CallCallback} callback - The callback to be invoked. It will be passed just one argument: the item from the array. * @param {CallCallback} callback - The callback to be invoked. It will be passed just one argument: the item from the array.
* @param {*} context - The scope in which the callback will be invoked. * @param {*} context - The scope in which the callback will be invoked.
* *
* @return {array} The array of objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that was passed to this Action.
*/ */
var Call = function (items, callback, context) var Call = function (items, callback, context)
{ {

View file

@ -14,6 +14,8 @@
* @function Phaser.Actions.GetFirst * @function Phaser.Actions.GetFirst
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.
* @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array. * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -14,6 +14,8 @@
* @function Phaser.Actions.GetLast * @function Phaser.Actions.GetLast
* @since 3.3.0 * @since 3.3.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.
* @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array. * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -33,10 +33,12 @@ var tempZone = new Zone({ sys: { queueDepthSort: NOOP }}, 0, 0, 1, 1);
* @function Phaser.Actions.GridAlign * @function Phaser.Actions.GridAlign
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {GridAlignConfig} options - The GridAlign Configuration object. * @param {GridAlignConfig} options - The GridAlign Configuration object.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var GridAlign = function (items, options) var GridAlign = function (items, options)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.IncAlpha * @function Phaser.Actions.IncAlpha
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `alpha` property. * @param {number} value - The amount to be added to the `alpha` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var IncAlpha = function (items, value, step, index, direction) var IncAlpha = function (items, value, step, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.IncX * @function Phaser.Actions.IncX
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `x` property. * @param {number} value - The amount to be added to the `x` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var IncX = function (items, value, step, index, direction) var IncX = function (items, value, step, index, direction)
{ {

View file

@ -17,6 +17,8 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.IncXY * @function Phaser.Actions.IncXY
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} x - The amount to be added to the `x` property. * @param {number} x - The amount to be added to the `x` property.
* @param {number} [y=x] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value. * @param {number} [y=x] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value.
@ -25,7 +27,7 @@ var PropertyValueInc = require('./PropertyValueInc');
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var IncXY = function (items, x, y, stepX, stepY, index, direction) var IncXY = function (items, x, y, stepX, stepY, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.IncY * @function Phaser.Actions.IncY
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `y` property. * @param {number} value - The amount to be added to the `y` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var IncY = function (items, value, step, index, direction) var IncY = function (items, value, step, index, direction)
{ {

View file

@ -10,12 +10,14 @@
* @function Phaser.Actions.PlaceOnCircle * @function Phaser.Actions.PlaceOnCircle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Circle} circle - [description] * @param {Phaser.Geom.Circle} circle - [description]
* @param {number} [startAngle=0] - [description] * @param {number} [startAngle=0] - [description]
* @param {number} [endAngle=6.28] - [description] * @param {number} [endAngle=6.28] - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var PlaceOnCircle = function (items, circle, startAngle, endAngle) var PlaceOnCircle = function (items, circle, startAngle, endAngle)
{ {

View file

@ -10,12 +10,14 @@
* @function Phaser.Actions.PlaceOnEllipse * @function Phaser.Actions.PlaceOnEllipse
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Ellipse} ellipse - [description] * @param {Phaser.Geom.Ellipse} ellipse - [description]
* @param {number} [startAngle=0] - [description] * @param {number} [startAngle=0] - [description]
* @param {number} [endAngle=6.28] - [description] * @param {number} [endAngle=6.28] - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var PlaceOnEllipse = function (items, ellipse, startAngle, endAngle) var PlaceOnEllipse = function (items, ellipse, startAngle, endAngle)
{ {

View file

@ -12,10 +12,12 @@ var GetPoints = require('../geom/line/GetPoints');
* @function Phaser.Actions.PlaceOnLine * @function Phaser.Actions.PlaceOnLine
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Line} line - [description] * @param {Phaser.Geom.Line} line - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var PlaceOnLine = function (items, line) var PlaceOnLine = function (items, line)
{ {

View file

@ -20,11 +20,13 @@ var RotateRight = require('../utils/array/RotateRight');
* @function Phaser.Actions.PlaceOnRectangle * @function Phaser.Actions.PlaceOnRectangle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - [description] * @param {Phaser.Geom.Rectangle} rect - [description]
* @param {integer} [shift=1] - [description] * @param {integer} [shift=1] - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var PlaceOnRectangle = function (items, rect, shift) var PlaceOnRectangle = function (items, rect, shift)
{ {

View file

@ -13,11 +13,13 @@ var BresenhamPoints = require('../geom/line/BresenhamPoints');
* @function Phaser.Actions.PlaceOnTriangle * @function Phaser.Actions.PlaceOnTriangle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Triangle} triangle - [description] * @param {Phaser.Geom.Triangle} triangle - [description]
* @param {number} [stepRate=1] - [description] * @param {number} [stepRate=1] - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var PlaceOnTriangle = function (items, triangle, stepRate) var PlaceOnTriangle = function (items, triangle, stepRate)
{ {

View file

@ -10,11 +10,13 @@
* @function Phaser.Actions.PlayAnimation * @function Phaser.Actions.PlayAnimation
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} key - [description] * @param {string} key - [description]
* @param {(string|integer)} [startFrame] - [description] * @param {(string|integer)} [startFrame] - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var PlayAnimation = function (items, key, startFrame) var PlayAnimation = function (items, key, startFrame)
{ {

View file

@ -15,6 +15,8 @@
* @function Phaser.Actions.PropertyValueInc * @function Phaser.Actions.PropertyValueInc
* @since 3.3.0 * @since 3.3.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {string} key - The property to be updated. * @param {string} key - The property to be updated.
* @param {number} value - The amount to be added to the property. * @param {number} value - The amount to be added to the property.
@ -22,7 +24,7 @@
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var PropertyValueInc = function (items, key, value, step, index, direction) var PropertyValueInc = function (items, key, value, step, index, direction)
{ {

View file

@ -15,6 +15,8 @@
* @function Phaser.Actions.PropertyValueSet * @function Phaser.Actions.PropertyValueSet
* @since 3.3.0 * @since 3.3.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {string} key - The property to be updated. * @param {string} key - The property to be updated.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
@ -22,7 +24,7 @@
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var PropertyValueSet = function (items, key, value, step, index, direction) var PropertyValueSet = function (items, key, value, step, index, direction)
{ {

View file

@ -12,10 +12,12 @@ var Random = require('../geom/circle/Random');
* @function Phaser.Actions.RandomCircle * @function Phaser.Actions.RandomCircle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Circle} circle - [description] * @param {Phaser.Geom.Circle} circle - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var RandomCircle = function (items, circle) var RandomCircle = function (items, circle)
{ {

View file

@ -12,10 +12,12 @@ var Random = require('../geom/ellipse/Random');
* @function Phaser.Actions.RandomEllipse * @function Phaser.Actions.RandomEllipse
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Ellipse} ellipse - [description] * @param {Phaser.Geom.Ellipse} ellipse - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var RandomEllipse = function (items, ellipse) var RandomEllipse = function (items, ellipse)
{ {

View file

@ -12,10 +12,12 @@ var Random = require('../geom/line/Random');
* @function Phaser.Actions.RandomLine * @function Phaser.Actions.RandomLine
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Line} line - [description] * @param {Phaser.Geom.Line} line - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var RandomLine = function (items, line) var RandomLine = function (items, line)
{ {

View file

@ -12,10 +12,12 @@ var Random = require('../geom/rectangle/Random');
* @function Phaser.Actions.RandomRectangle * @function Phaser.Actions.RandomRectangle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - [description] * @param {Phaser.Geom.Rectangle} rect - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var RandomRectangle = function (items, rect) var RandomRectangle = function (items, rect)
{ {

View file

@ -12,10 +12,12 @@ var Random = require('../geom/triangle/Random');
* @function Phaser.Actions.RandomTriangle * @function Phaser.Actions.RandomTriangle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Triangle} triangle - [description] * @param {Phaser.Geom.Triangle} triangle - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var RandomTriangle = function (items, triangle) var RandomTriangle = function (items, triangle)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.Rotate * @function Phaser.Actions.Rotate
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `rotation` property (in radians). * @param {number} value - The amount to be added to the `rotation` property (in radians).
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var Rotate = function (items, value, step, index, direction) var Rotate = function (items, value, step, index, direction)
{ {

View file

@ -13,11 +13,13 @@ var DistanceBetween = require('../math/distance/DistanceBetween');
* @function Phaser.Actions.RotateAround * @function Phaser.Actions.RotateAround
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {object} point - Any object with public `x` and `y` properties. * @param {object} point - Any object with public `x` and `y` properties.
* @param {number} angle - The angle to rotate by, in radians. * @param {number} angle - The angle to rotate by, in radians.
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var RotateAround = function (items, point, angle) var RotateAround = function (items, point, angle)
{ {

View file

@ -12,12 +12,14 @@ var MathRotateAroundDistance = require('../math/RotateAroundDistance');
* @function Phaser.Actions.RotateAroundDistance * @function Phaser.Actions.RotateAroundDistance
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {object} point - Any object with public `x` and `y` properties. * @param {object} point - Any object with public `x` and `y` properties.
* @param {number} angle - The angle to rotate by, in radians. * @param {number} angle - The angle to rotate by, in radians.
* @param {number} distance - The distance from the point of rotation in pixels. * @param {number} distance - The distance from the point of rotation in pixels.
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var RotateAroundDistance = function (items, point, angle, distance) var RotateAroundDistance = function (items, point, angle, distance)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.ScaleX * @function Phaser.Actions.ScaleX
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `scaleX` property. * @param {number} value - The amount to be added to the `scaleX` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var ScaleX = function (items, value, step, index, direction) var ScaleX = function (items, value, step, index, direction)
{ {

View file

@ -17,6 +17,8 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.ScaleXY * @function Phaser.Actions.ScaleXY
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} scaleX - The amount to be added to the `scaleX` property. * @param {number} scaleX - The amount to be added to the `scaleX` property.
* @param {number} [scaleY] - The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value. * @param {number} [scaleY] - The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value.
@ -25,7 +27,7 @@ var PropertyValueInc = require('./PropertyValueInc');
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var ScaleXY = function (items, scaleX, scaleY, stepX, stepY, index, direction) var ScaleXY = function (items, scaleX, scaleY, stepX, stepY, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
* @function Phaser.Actions.ScaleY * @function Phaser.Actions.ScaleY
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `scaleY` property. * @param {number} value - The amount to be added to the `scaleY` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var ScaleY = function (items, value, step, index, direction) var ScaleY = function (items, value, step, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetAlpha * @function Phaser.Actions.SetAlpha
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetAlpha = function (items, value, step, index, direction) var SetAlpha = function (items, value, step, index, direction)
{ {

View file

@ -17,12 +17,14 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetBlendMode * @function Phaser.Actions.SetBlendMode
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetBlendMode = function (items, value, index, direction) var SetBlendMode = function (items, value, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetDepth * @function Phaser.Actions.SetDepth
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetDepth = function (items, value, step, index, direction) var SetDepth = function (items, value, step, index, direction)
{ {

View file

@ -10,11 +10,13 @@
* @function Phaser.Actions.SetHitArea * @function Phaser.Actions.SetHitArea
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {*} hitArea - [description] * @param {*} hitArea - [description]
* @param {HitAreaCallback} hitAreaCallback - [description] * @param {HitAreaCallback} hitAreaCallback - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var SetHitArea = function (items, hitArea, hitAreaCallback) var SetHitArea = function (items, hitArea, hitAreaCallback)
{ {

View file

@ -17,6 +17,8 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetOrigin * @function Phaser.Actions.SetOrigin
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} originX - The amount to set the `originX` property to. * @param {number} originX - The amount to set the `originX` property to.
* @param {number} [originY] - The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value. * @param {number} [originY] - The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value.
@ -25,7 +27,7 @@ var PropertyValueSet = require('./PropertyValueSet');
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetOrigin = function (items, originX, originY, stepX, stepY, index, direction) var SetOrigin = function (items, originX, originY, stepX, stepY, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetRotation * @function Phaser.Actions.SetRotation
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetRotation = function (items, value, step, index, direction) var SetRotation = function (items, value, step, index, direction)
{ {

View file

@ -17,6 +17,8 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetScale * @function Phaser.Actions.SetScale
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} scaleX - The amount to set the `scaleX` property to. * @param {number} scaleX - The amount to set the `scaleX` property to.
* @param {number} [scaleY] - The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value. * @param {number} [scaleY] - The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value.
@ -25,7 +27,7 @@ var PropertyValueSet = require('./PropertyValueSet');
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetScale = function (items, scaleX, scaleY, stepX, stepY, index, direction) var SetScale = function (items, scaleX, scaleY, stepX, stepY, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetScaleX * @function Phaser.Actions.SetScaleX
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetScaleX = function (items, value, step, index, direction) var SetScaleX = function (items, value, step, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetScaleY * @function Phaser.Actions.SetScaleY
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetScaleY = function (items, value, step, index, direction) var SetScaleY = function (items, value, step, index, direction)
{ {

View file

@ -10,13 +10,15 @@
* @function Phaser.Actions.SetTint * @function Phaser.Actions.SetTint
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {number} topLeft - [description] * @param {number} topLeft - [description]
* @param {number} [topRight] - [description] * @param {number} [topRight] - [description]
* @param {number} [bottomLeft] - [description] * @param {number} [bottomLeft] - [description]
* @param {number} [bottomRight] - [description] * @param {number} [bottomRight] - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var SetTint = function (items, topLeft, topRight, bottomLeft, bottomRight) var SetTint = function (items, topLeft, topRight, bottomLeft, bottomRight)
{ {

View file

@ -15,12 +15,14 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetVisible * @function Phaser.Actions.SetVisible
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {boolean} value - The value to set the property to. * @param {boolean} value - The value to set the property to.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetVisible = function (items, value, index, direction) var SetVisible = function (items, value, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetX * @function Phaser.Actions.SetX
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetX = function (items, value, step, index, direction) var SetX = function (items, value, step, index, direction)
{ {

View file

@ -17,6 +17,8 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetXY * @function Phaser.Actions.SetXY
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} x - The amount to set the `x` property to. * @param {number} x - The amount to set the `x` property to.
* @param {number} [y=x] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value. * @param {number} [y=x] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value.
@ -25,7 +27,7 @@ var PropertyValueSet = require('./PropertyValueSet');
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetXY = function (items, x, y, stepX, stepY, index, direction) var SetXY = function (items, x, y, stepX, stepY, index, direction)
{ {

View file

@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
* @function Phaser.Actions.SetY * @function Phaser.Actions.SetY
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action. * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to. * @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.
* *
* @return {array} The array of objects that were passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.
*/ */
var SetY = function (items, value, step, index, direction) var SetY = function (items, value, step, index, direction)
{ {

View file

@ -15,6 +15,9 @@ var Vector2 = require('../math/Vector2');
* @function Phaser.Actions.ShiftPosition * @function Phaser.Actions.ShiftPosition
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items]
* @generic {Phaser.Math.Vector2} O - [output,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {number} x - [description] * @param {number} x - [description]
* @param {number} y - [description] * @param {number} y - [description]

View file

@ -12,9 +12,11 @@ var ArrayShuffle = require('../utils/array/Shuffle');
* @function Phaser.Actions.Shuffle * @function Phaser.Actions.Shuffle
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var Shuffle = function (items) var Shuffle = function (items)
{ {

View file

@ -12,13 +12,15 @@ var MathSmoothStep = require('../math/SmoothStep');
* @function Phaser.Actions.SmoothStep * @function Phaser.Actions.SmoothStep
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description] * @param {string} property - [description]
* @param {number} min - [description] * @param {number} min - [description]
* @param {number} max - [description] * @param {number} max - [description]
* @param {number} inc - [description] * @param {number} inc - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var SmoothStep = function (items, property, min, max, inc) var SmoothStep = function (items, property, min, max, inc)
{ {

View file

@ -12,13 +12,15 @@ var MathSmootherStep = require('../math/SmootherStep');
* @function Phaser.Actions.SmootherStep * @function Phaser.Actions.SmootherStep
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description] * @param {string} property - [description]
* @param {number} min - [description] * @param {number} min - [description]
* @param {number} max - [description] * @param {number} max - [description]
* @param {number} inc - [description] * @param {number} inc - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var SmootherStep = function (items, property, min, max, inc) var SmootherStep = function (items, property, min, max, inc)
{ {

View file

@ -10,13 +10,15 @@
* @function Phaser.Actions.Spread * @function Phaser.Actions.Spread
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description] * @param {string} property - [description]
* @param {number} min - [description] * @param {number} min - [description]
* @param {number} max - [description] * @param {number} max - [description]
* @param {number} [inc=false] - [description] * @param {number} [inc=false] - [description]
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var Spread = function (items, property, min, max, inc) var Spread = function (items, property, min, max, inc)
{ {

View file

@ -10,9 +10,11 @@
* @function Phaser.Actions.ToggleVisible * @function Phaser.Actions.ToggleVisible
* @since 3.0.0 * @since 3.0.0
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var ToggleVisible = function (items) var ToggleVisible = function (items)
{ {

View file

@ -14,11 +14,13 @@ var Wrap = require('../math/Wrap');
* @since 3.0.0 * @since 3.0.0
* @see Phaser.Math.Wrap * @see Phaser.Math.Wrap
* *
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - The rectangle. * @param {Phaser.Geom.Rectangle} rect - The rectangle.
* @param {number} [padding=0] - An amount added to each side of the rectangle during the operation. * @param {number} [padding=0] - An amount added to each side of the rectangle during the operation.
* *
* @return {array} The array of Game Objects that was passed to this Action. * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/ */
var WrapInRectangle = function (items, rect, padding) var WrapInRectangle = function (items, rect, padding)
{ {