/** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ declare var Actions: any; declare var Class: any; declare var GetFastValue: any; declare var GetValue: any; declare var Range: { new (): Range; prototype: Range; readonly END_TO_END: number; readonly END_TO_START: number; readonly START_TO_END: number; readonly START_TO_START: number; }; declare var Set: SetConstructor; declare var Sprite: any; /** * @callback GroupCallback * * @param {Phaser.GameObjects.GameObject} item - A group member */ /** * @callback GroupMultipleCreateCallback * * @param {Phaser.GameObjects.GameObject[]} items - The newly created group members */ /** * @typedef {object} GroupConfig * * @property {?object} [classType=Sprite] - Sets {@link Phaser.GameObjects.Group#classType}. * @property {?boolean} [active=true] - Sets {@link Phaser.GameObjects.Group#active}. * @property {?number} [maxSize=-1] - Sets {@link Phaser.GameObjects.Group#maxSize}. * @property {?string} [defaultKey=null] - Sets {@link Phaser.GameObjects.Group#defaultKey}. * @property {?(string|integer)} [defaultFrame=null] - Sets {@link Phaser.GameObjects.Group#defaultFrame}. * @property {?boolean} [runChildUpdate=false] - Sets {@link Phaser.GameObjects.Group#runChildUpdate}. * @property {?GroupCallback} [createCallback=null] - Sets {@link Phaser.GameObjects.Group#createCallback}. * @property {?GroupCallback} [removeCallback=null] - Sets {@link Phaser.GameObjects.Group#removeCallback}. * @property {?GroupMultipleCreateCallback} [createMultipleCallback=null] - Sets {@link Phaser.GameObjects.Group#createMultipleCallback}. */ /** * @typedef {object} GroupCreateConfig * * The total number of objects created will be * * key.length * frame.length * frameQuantity * (yoyo ? 2 : 1) * (1 + repeat) * * In the simplest case, 1 + `repeat` objects will be created. * * If `max` is positive, then the total created will not exceed `max`. * * `key` is required. {@link Phaser.GameObjects.Group#defaultKey} is not used. * * @property {?object} [classType] - The class of each new Game Object. * @property {string} [key] - The texture key of each new Game Object. * @property {?(string|integer)} [frame=null] - The texture frame of each new Game Object. * @property {?boolean} [visible=true] - The visible state of each new Game Object. * @property {?boolean} [active=true] - The active state of each new Game Object. * @property {?number} [repeat=0] - The number of times each `key` × `frame` combination will be *repeated* (after the first combination). * @property {?boolean} [randomKey=false] - Select a `key` at random. * @property {?boolean} [randomFrame=false] - Select a `frame` at random. * @property {?boolean} [yoyo=false] - Select keys and frames by moving forward then backward through `key` and `frame`. * @property {?number} [frameQuantity=1] - The number of times each `frame` should be combined with one `key`. * @property {?number} [max=0] - The maximum number of new Game Objects to create. 0 is no maximum. * @property {?object} [setXY] * @property {?number} [setXY.x=0] - The horizontal position of each new Game Object. * @property {?number} [setXY.y=0] - The vertical position of each new Game Object. * @property {?number} [setXY.stepX=0] - Increment each Game Object's horizontal position from the previous by this amount, starting from `setXY.x`. * @property {?number} [setXY.stepY=0] - Increment each Game Object's vertical position from the previous by this amount, starting from `setXY.y`. * @property {?object} [setRotation] * @property {?number} [setRotation.value=0] - Rotation of each new Game Object. * @property {?number} [setRotation.step=0] - Increment each Game Object's rotation from the previous by this amount, starting at `setRotation.value`. * @property {?object} [setScale] * @property {?number} [setScale.x=0] - The horizontal scale of each new Game Object. * @property {?number} [setScale.y=0] - The vertical scale of each new Game Object. * @property {?number} [setScale.stepX=0] - Increment each Game Object's horizontal scale from the previous by this amount, starting from `setScale.x`. * @property {?number} [setScale.stepY=0] - Increment each Game object's vertical scale from the previous by this amount, starting from `setScale.y`. * @property {?object} [setAlpha] * @property {?number} [setAlpha.value=0] - The alpha value of each new Game Object. * @property {?number} [setAlpha.step=0] - Increment each Game Object's alpha from the previous by this amount, starting from `setAlpha.value`. * @property {?*} [hitArea] - A geometric shape that defines the hit area for the Game Object. * @property {?HitAreaCallback} [hitAreaCallback] - A callback to be invoked when the Game Object is interacted with. * @property {?(false|GridAlignConfig)} [gridAlign=false] - Align the new Game Objects in a grid using these settings. * * @see Phaser.Actions.GridAlign * @see Phaser.Actions.SetAlpha * @see Phaser.Actions.SetHitArea * @see Phaser.Actions.SetRotation * @see Phaser.Actions.SetScale * @see Phaser.Actions.SetXY * @see Phaser.GameObjects.Group#createFromConfig * @see Phaser.Utils.Array.Range */ /** * @classdesc A Group is a way for you to create, manipulate, or recycle similar Game Objects. * * Group membership is non-exclusive. A Game Object can belong to several groups, one group, or none. * * Groups themselves aren't displayable, and can't be positioned, rotated, scaled, or hidden. * * @class Group * @memberOf Phaser.GameObjects * @constructor * @since 3.0.0 * @param {Phaser.Scene} scene - The scene this group belongs to. * @param {(Phaser.GameObjects.GameObject[]|GroupConfig)} [children] - Game objects to add to this group; or the `config` argument. * @param {GroupConfig|GroupCreateConfig} [config] - Settings for this group. If `key` is set, Phaser.GameObjects.Group#createMultiple is also called with these settings. * * @see Phaser.Physics.Arcade.Group * @see Phaser.Physics.Arcade.StaticGroup */ declare var Group: any;