Hi!
I’ve started yesterday a small game project and i’ve an issue, followinbg this example from the lab http://labs.phaser.io/edit.html?src=src/plugins/custom%20game%20object.js i’ve tried to create a global plugin.
The main goal is using a sprite to write some text. The sprite contains all number and required chars.
class CharsetPlugin extends Phaser.Plugins.BasePlugin {
constructor(PluginManager: Phaser.Plugins.PluginManager) {
super(PluginManager);
this.pluginManager.registerGameObject('charset', this.createLetter)
}
createLetter(char: CharsetChar, color: CharsetColor, x: number, y: number) {
return this.displayList.add(new CharsetGameObject(this.scene, char, color, x, y));
}
}
My issue is related to this.displayList
which is not recognized as a method of my class, i’ve made a small research into the definitions files and this method is not available into.
I would like know if the lab is up to date and if the definitions file is not missing something.
Maybe i’m using it wrong?
Ty for your help