You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 8, 2018. It is now read-only.
My preemptive apologies if this is a silly question—I'm still a typescript/js noob.
When I try to add this plugin, I get a Typescript error:
/// <reference path="../lib/phaser.d.ts" />/// <reference path="../lib/phaser.plugin.isometric.d.ts" />vargame=newPhaser.game(// game stuff)game.plugins.add(newPhaser.Plugin.Isometric(game));// <- error here
The error is: "error TS2345: Argument of type 'Isometric' is not assignable to parameter of type 'PluginConstructorOf'. Type 'Isometric' provides no match for the signature 'new (...parameters: any[]): Plugin'"
I've trawled through Phaser's Plugin types and tried to hack things together to make it work but haven't had success so far, probably solely because of my own incompetence. I'm pretty sure this is the relevant section in Phaser. Any help is hugely appreciated!
The text was updated successfully, but these errors were encountered:
I'm not a regular user of TypeScript and haven't used it at all with Phaser, so I'm afraid I'm not really sure - I'll leave this open if someone else has any ideas though.
Hi all.
I've recently started to use Phaser and I've had this error - It seems that in new versions of Phaser you need to pass a constructor only. So just write:
this.game.plugins.add(Phaser.Plugin.Isometric);
and hopefully it will do the trick
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
My preemptive apologies if this is a silly question—I'm still a typescript/js noob.
When I try to add this plugin, I get a Typescript error:
The error is: "error TS2345: Argument of type 'Isometric' is not assignable to parameter of type 'PluginConstructorOf'. Type 'Isometric' provides no match for the signature 'new (...parameters: any[]): Plugin'"
I've trawled through Phaser's
Plugin
types and tried to hack things together to make it work but haven't had success so far, probably solely because of my own incompetence. I'm pretty sure this is the relevant section in Phaser. Any help is hugely appreciated!The text was updated successfully, but these errors were encountered: