fix(spine-plugin): errors throw while game destroy

This commit is contained in:
Pong 2021-02-22 20:50:03 +08:00
parent d3536fb138
commit 9ff874edf1

View file

@ -1128,18 +1128,16 @@ var SpinePlugin = new Class({
*/ */
gameDestroy: function () gameDestroy: function ()
{ {
this.destroy(); this.pluginManager.removeGameObject('spine', true, true);
this.pluginManager.removeGameObject('spineContainer', true, true);
this.pluginManager = null;
if (sceneRenderer) if (sceneRenderer)
{ {
sceneRenderer.dispose(); sceneRenderer.dispose();
sceneRenderer = null;
} }
this.sceneRenderer = null; this.sceneRenderer = null;
this.pluginManager = null;
this.pluginManager.removeGameObject('spine', true, true);
this.pluginManager.removeGameObject('spineContainer', true, true);
} }
}); });