From 8e8d43dcf16a99bdda0fa926c84ff739472af83e Mon Sep 17 00:00:00 2001 From: photonstorm Date: Thu, 27 Jul 2017 17:39:46 +0100 Subject: [PATCH] Added setName method. --- v3/src/gameobjects/GameObject.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/v3/src/gameobjects/GameObject.js b/v3/src/gameobjects/GameObject.js index 2cc6b79c7..c04873edf 100644 --- a/v3/src/gameobjects/GameObject.js +++ b/v3/src/gameobjects/GameObject.js @@ -50,9 +50,11 @@ var GameObject = new Class({ return this; }, - // To be overridden by custom GameObjects. Allows base objects to be used in a Pool. - update: function () + setName: function (value) { + this.name = value; + + return this; }, setInteractive: function (shape, callback) @@ -62,6 +64,11 @@ var GameObject = new Class({ 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 toJSON: function () {