Skip to content

Commit ff86440

Browse files
committed
Added Active property and toggle method.
1 parent b494ace commit ff86440

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

v3/src/gameobjects/GameObject.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ var GameObject = new Class({
2525

2626
this.name = '';
2727

28+
this.active = true;
29+
2830
this.tabIndex = -1;
2931

3032
this.parent;
@@ -35,6 +37,14 @@ var GameObject = new Class({
3537
this.renderFlags = 15;
3638
},
3739

40+
// For GameObject Pooling and item selection
41+
setActive: function (value)
42+
{
43+
this.active = value;
44+
45+
return this;
46+
},
47+
3848
// Can be overridden by custom Game Objects, but provides default export functionality
3949
toJSON: function ()
4050
{

0 commit comments

Comments
 (0)