Merge pull request #4577 from samme/feature/group-name

Add Group#name
This commit is contained in:
Richard Davey 2019-06-05 22:45:58 +01:00 committed by GitHub
commit ab17888c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -113,6 +113,17 @@ var Group = new Class({
*/
this.classType = GetFastValue(config, 'classType', Sprite);
/**
* The name of this group.
* Empty by default and never populated by Phaser, this is left for developers to use.
*
* @name Phaser.GameObjects.Group#name
* @type {string}
* @default ''
* @since 3.18.0
*/
this.name = GetFastValue(config, 'name', '');
/**
* Whether this group runs its {@link Phaser.GameObjects.Group#preUpdate} method
* (which may update any members).

View file

@ -3,6 +3,7 @@
* @since 3.0.0
*
* @property {?Function} [classType=Sprite] - Sets {@link Phaser.GameObjects.Group#classType}.
* @property {?string} [name=''] - Sets Sets {@link Phaser.GameObjects.Group#name}.
* @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}.