Skip to content

Commit 634dfe4

Browse files
committed
Add Phaser.GameObjects.Group#setName
1 parent d6e8600 commit 634dfe4

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

src/gameobjects/group/Group.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,24 @@ var Group = new Class({
11031103
return (capacity - used);
11041104
},
11051105

1106+
/**
1107+
* Sets the `name` property of this Group.
1108+
* The `name` property is not populated by Phaser and is presented for your own use.
1109+
*
1110+
* @method Phaser.GameObjects.Group#setName
1111+
* @since 3.24.0
1112+
*
1113+
* @param {string} value - The name to be given to this Group.
1114+
*
1115+
* @return {this} This Group object.
1116+
*/
1117+
setName: function (value)
1118+
{
1119+
this.name = value;
1120+
1121+
return this;
1122+
},
1123+
11061124
/**
11071125
* Sets the property as defined in `key` of each group member to the given value.
11081126
*
@@ -1260,7 +1278,7 @@ var Group = new Class({
12601278
/**
12611279
* Iterate through the group members changing the position of each element to be that of the element that came before
12621280
* it in the array (or after it if direction = 1)
1263-
*
1281+
*
12641282
* The first group member position is set to x/y.
12651283
*
12661284
* @method Phaser.GameObjects.Group#shiftPosition

0 commit comments

Comments
 (0)