Added setName method.

This commit is contained in:
photonstorm 2017-07-27 17:39:46 +01:00
parent 80aa157a11
commit 8e8d43dcf1

View file

@ -50,9 +50,11 @@ var GameObject = new Class({
return this; return this;
}, },
// To be overridden by custom GameObjects. Allows base objects to be used in a Pool. setName: function (value)
update: function ()
{ {
this.name = value;
return this;
}, },
setInteractive: function (shape, callback) setInteractive: function (shape, callback)
@ -62,6 +64,11 @@ var GameObject = new Class({
return this; return this;
}, },
// To be overridden by custom GameObjects. Allows base objects to be used in a Pool.
update: function ()
{
},
// Can be overridden by custom Game Objects, but provides default export functionality // Can be overridden by custom Game Objects, but provides default export functionality
toJSON: function () toJSON: function ()
{ {