Skip to content

Commit 8e8d43d

Browse files
committed
Added setName method.
1 parent 80aa157 commit 8e8d43d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

v3/src/gameobjects/GameObject.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ var GameObject = new Class({
5050
return this;
5151
},
5252

53-
// To be overridden by custom GameObjects. Allows base objects to be used in a Pool.
54-
update: function ()
53+
setName: function (value)
5554
{
55+
this.name = value;
56+
57+
return this;
5658
},
5759

5860
setInteractive: function (shape, callback)
@@ -62,6 +64,11 @@ var GameObject = new Class({
6264
return this;
6365
},
6466

67+
// To be overridden by custom GameObjects. Allows base objects to be used in a Pool.
68+
update: function ()
69+
{
70+
},
71+
6572
// Can be overridden by custom Game Objects, but provides default export functionality
6673
toJSON: function ()
6774
{

0 commit comments

Comments
 (0)