forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupFactory.js
More file actions
26 lines (24 loc) · 966 Bytes
/
Copy pathGroupFactory.js
File metadata and controls
26 lines (24 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Group = require('./Group');
var GameObjectFactory = require('../GameObjectFactory');
/**
* Creates a new Group Game Object and adds it to the Scene.
*
* Note: This method will only be available if the Group Game Object has been built into Phaser.
*
* @method Phaser.GameObjects.GameObjectFactory#group
* @since 3.0.0
*
* @param {(Phaser.GameObjects.GameObject[]|GroupConfig|GroupConfig[])} [children] - Game Objects to add to this Group; or the `config` argument.
* @param {GroupConfig} [config] - A Group Configuration object.
*
* @return {Phaser.GameObjects.Group} The Game Object that was created.
*/
GameObjectFactory.register('group', function (children, config)
{
return this.updateList.add(new Group(this.scene, children, config));
});