mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Add generic type on Actions
This commit is contained in:
parent
1f44366bc7
commit
bdf373b6e8
49 changed files with 145 additions and 46 deletions
|
@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.Angle
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -16,11 +16,13 @@
|
|||
* @function Phaser.Actions.Call
|
||||
* @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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
* @function Phaser.Actions.GetFirst
|
||||
* @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 {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.
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
* @function Phaser.Actions.GetLast
|
||||
* @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 {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.
|
||||
|
|
|
@ -33,10 +33,12 @@ var tempZone = new Zone({ sys: { queueDepthSort: NOOP }}, 0, 0, 1, 1);
|
|||
* @function Phaser.Actions.GridAlign
|
||||
* @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 {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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.IncAlpha
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.IncX
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,8 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.IncXY
|
||||
* @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 {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.
|
||||
|
@ -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} [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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.IncY
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -10,12 +10,14 @@
|
|||
* @function Phaser.Actions.PlaceOnCircle
|
||||
* @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 {Phaser.Geom.Circle} circle - [description]
|
||||
* @param {number} [startAngle=0] - [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)
|
||||
{
|
||||
|
|
|
@ -10,12 +10,14 @@
|
|||
* @function Phaser.Actions.PlaceOnEllipse
|
||||
* @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 {Phaser.Geom.Ellipse} ellipse - [description]
|
||||
* @param {number} [startAngle=0] - [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)
|
||||
{
|
||||
|
|
|
@ -12,10 +12,12 @@ var GetPoints = require('../geom/line/GetPoints');
|
|||
* @function Phaser.Actions.PlaceOnLine
|
||||
* @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 {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)
|
||||
{
|
||||
|
|
|
@ -20,11 +20,13 @@ var RotateRight = require('../utils/array/RotateRight');
|
|||
* @function Phaser.Actions.PlaceOnRectangle
|
||||
* @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 {Phaser.Geom.Rectangle} rect - [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)
|
||||
{
|
||||
|
|
|
@ -13,11 +13,13 @@ var BresenhamPoints = require('../geom/line/BresenhamPoints');
|
|||
* @function Phaser.Actions.PlaceOnTriangle
|
||||
* @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 {Phaser.Geom.Triangle} triangle - [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)
|
||||
{
|
||||
|
|
|
@ -10,11 +10,13 @@
|
|||
* @function Phaser.Actions.PlayAnimation
|
||||
* @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 {string} key - [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)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* @function Phaser.Actions.PropertyValueInc
|
||||
* @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 {string} key - The property to be updated.
|
||||
* @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} [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)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* @function Phaser.Actions.PropertyValueSet
|
||||
* @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 {string} key - The property to be updated.
|
||||
* @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} [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)
|
||||
{
|
||||
|
|
|
@ -12,10 +12,12 @@ var Random = require('../geom/circle/Random');
|
|||
* @function Phaser.Actions.RandomCircle
|
||||
* @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 {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)
|
||||
{
|
||||
|
|
|
@ -12,10 +12,12 @@ var Random = require('../geom/ellipse/Random');
|
|||
* @function Phaser.Actions.RandomEllipse
|
||||
* @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 {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)
|
||||
{
|
||||
|
|
|
@ -12,10 +12,12 @@ var Random = require('../geom/line/Random');
|
|||
* @function Phaser.Actions.RandomLine
|
||||
* @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 {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)
|
||||
{
|
||||
|
|
|
@ -12,10 +12,12 @@ var Random = require('../geom/rectangle/Random');
|
|||
* @function Phaser.Actions.RandomRectangle
|
||||
* @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 {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)
|
||||
{
|
||||
|
|
|
@ -12,10 +12,12 @@ var Random = require('../geom/triangle/Random');
|
|||
* @function Phaser.Actions.RandomTriangle
|
||||
* @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 {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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.Rotate
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -13,11 +13,13 @@ var DistanceBetween = require('../math/distance/DistanceBetween');
|
|||
* @function Phaser.Actions.RotateAround
|
||||
* @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 {object} point - Any object with public `x` and `y` properties.
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -12,12 +12,14 @@ var MathRotateAroundDistance = require('../math/RotateAroundDistance');
|
|||
* @function Phaser.Actions.RotateAroundDistance
|
||||
* @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 {object} point - Any object with public `x` and `y` properties.
|
||||
* @param {number} angle - The angle to rotate by, in radians.
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.ScaleX
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,8 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.ScaleXY
|
||||
* @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 {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.
|
||||
|
@ -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} [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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueInc = require('./PropertyValueInc');
|
|||
* @function Phaser.Actions.ScaleY
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetAlpha
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,12 +17,14 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetBlendMode
|
||||
* @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 {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} [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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetDepth
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -10,11 +10,13 @@
|
|||
* @function Phaser.Actions.SetHitArea
|
||||
* @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 {*} hitArea - [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)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,8 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetOrigin
|
||||
* @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 {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.
|
||||
|
@ -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} [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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetRotation
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,8 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetScale
|
||||
* @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 {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.
|
||||
|
@ -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} [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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetScaleX
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetScaleY
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -10,13 +10,15 @@
|
|||
* @function Phaser.Actions.SetTint
|
||||
* @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 {number} topLeft - [description]
|
||||
* @param {number} [topRight] - [description]
|
||||
* @param {number} [bottomLeft] - [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)
|
||||
{
|
||||
|
|
|
@ -15,12 +15,14 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetVisible
|
||||
* @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 {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} [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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetX
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,8 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetXY
|
||||
* @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 {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.
|
||||
|
@ -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} [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)
|
||||
{
|
||||
|
|
|
@ -17,13 +17,15 @@ var PropertyValueSet = require('./PropertyValueSet');
|
|||
* @function Phaser.Actions.SetY
|
||||
* @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 {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 {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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,9 @@ var Vector2 = require('../math/Vector2');
|
|||
* @function Phaser.Actions.ShiftPosition
|
||||
* @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 {number} x - [description]
|
||||
* @param {number} y - [description]
|
||||
|
|
|
@ -12,9 +12,11 @@ var ArrayShuffle = require('../utils/array/Shuffle');
|
|||
* @function Phaser.Actions.Shuffle
|
||||
* @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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -12,13 +12,15 @@ var MathSmoothStep = require('../math/SmoothStep');
|
|||
* @function Phaser.Actions.SmoothStep
|
||||
* @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 {string} property - [description]
|
||||
* @param {number} min - [description]
|
||||
* @param {number} max - [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)
|
||||
{
|
||||
|
|
|
@ -12,13 +12,15 @@ var MathSmootherStep = require('../math/SmootherStep');
|
|||
* @function Phaser.Actions.SmootherStep
|
||||
* @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 {string} property - [description]
|
||||
* @param {number} min - [description]
|
||||
* @param {number} max - [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)
|
||||
{
|
||||
|
|
|
@ -10,13 +10,15 @@
|
|||
* @function Phaser.Actions.Spread
|
||||
* @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 {string} property - [description]
|
||||
* @param {number} min - [description]
|
||||
* @param {number} max - [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)
|
||||
{
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
* @function Phaser.Actions.ToggleVisible
|
||||
* @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.
|
||||
*
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -14,11 +14,13 @@ var Wrap = require('../math/Wrap');
|
|||
* @since 3.0.0
|
||||
* @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 {Phaser.Geom.Rectangle} rect - The rectangle.
|
||||
* @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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue