浏览代码

The new SpineGameObject should use the gameObject's scene ref, not the system scene (#2357)

spayton 2 年之前
父节点
当前提交
f80bc5e110
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-ts/spine-phaser/src/SpinePlugin.ts

+ 1 - 1
spine-ts/spine-phaser/src/SpinePlugin.ts

@@ -124,7 +124,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin {
 
 		let self = this;
 		let addSpineGameObject = function (this: Phaser.GameObjects.GameObjectFactory, x: number, y: number, dataKey: string, atlasKey: string, boundsProvider: SpineGameObjectBoundsProvider) {
-			let gameObject = new SpineGameObject(scene, self, x, y, dataKey, atlasKey, boundsProvider);
+			let gameObject = new SpineGameObject(this.scene, self, x, y, dataKey, atlasKey, boundsProvider);
 			this.displayList.add(gameObject);
 			this.updateList.add(gameObject);
 			return gameObject;