Rework objects recycling to be opt-in with a reinitialize method

Only show in developer changelog
This commit is contained in:
Florian Rival
2021-01-08 17:09:42 +01:00
parent a2e00e5adb
commit d83ce0ed9d
16 changed files with 329 additions and 241 deletions
@@ -22,11 +22,8 @@ gdjs.TextEntryRuntimeObject = function(runtimeScene, textEntryObjectData)
/** @type {boolean} */
this._activated = true;
if (this._renderer)
gdjs.TextEntryRuntimeObjectRenderer.call(this._renderer, this, runtimeScene);
else
/** @type {gdjs.TextEntryRuntimeObjectRenderer} */
this._renderer = new gdjs.TextEntryRuntimeObjectRenderer(this, runtimeScene);
/** @type {gdjs.TextEntryRuntimeObjectRenderer} */
this._renderer = new gdjs.TextEntryRuntimeObjectRenderer(this, runtimeScene);
// *ALWAYS* call `this.onCreated()` at the very end of your object constructor.
this.onCreated();