From f1eb31c81aec88c5a48795e35583792a0594e7f3 Mon Sep 17 00:00:00 2001 From: samme Date: Mon, 25 May 2020 10:58:26 -0700 Subject: [PATCH] Add Phaser.GameObjects.Group#setActive --- src/gameobjects/group/Group.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/gameobjects/group/Group.js b/src/gameobjects/group/Group.js index e2d79d2cd..7bf1f99ac 100644 --- a/src/gameobjects/group/Group.js +++ b/src/gameobjects/group/Group.js @@ -1102,6 +1102,24 @@ var Group = new Class({ return (capacity - used); }, + /** + * Sets the `active` property of this Group. + * When active, this Group runs its `preUpdate` method. + * + * @method Phaser.GameObjects.Group#setActive + * @since 3.24.0 + * + * @param {boolean} value - True if this Group should be set as active, false if not. + * + * @return {this} This Group object. + */ + setActive: function (value) + { + this.active = value; + + return this; + }, + /** * Sets the `name` property of this Group. * The `name` property is not populated by Phaser and is presented for your own use.