The value passed as the `game` argument ([object Object]) is not an instance of Phaser.Game.
Closed this issue · 6 comments
jdnichollsc commented
Hi guys,
I'm trying to use my custom sprite here with the last version of Phaser-CE 2.14.0 and I'm getting the following issue:
phaser.min.js:3 Uncaught Error: The value passed as the `game` argument ([object Object]) is not an instance of Phaser.Game.
at Phaser.Extension.RotateSprite.e.Component.Core.init (phaser.min.js:3)
at Phaser.Extension.RotateSprite.e.Sprite [as constructor] (phaser.min.js:3)
at new Phaser.Extension.RotateSprite (pen.js:101)
at Object.create (pen.js:65)
at h.StateManager.loadComplete (p-wmmbhis8.entry.js:97)
at h.Loader.finishedLoading (p-wmmbhis8.entry.js:577)
at h.Loader.processLoadQueue (p-wmmbhis8.entry.js:577)
at h.Loader.asyncComplete (p-wmmbhis8.entry.js:577)
at h.Loader.fileComplete (p-wmmbhis8.entry.js:577)
at Image.t.data.onload (p-wmmbhis8.entry.js:577)
Let me know what you think
Thanks for your help! <3
samme commented
It works for me in https://codepen.io/samme/pen/YzXrjPQ.
See #317
Maybe we should just get rid of that check.
jdnichollsc commented
I'm testing from Codepen => https://codepen.io/jdnichollsc/pen/LYVzQmp
It's working now by using Phaser['Component'].Core.skipTypeChecks = true;
Thanks!
jdnichollsc commented
I think we don't need that validation, what do you think?
samme commented
I'll remove it.
samme commented
Fixed since v2.15.0.
jdnichollsc commented
Thanks for your help! 👍