Adalberto Posted August 13, 2017 Share Posted August 13, 2017 Hello, I'm developing a game with Ionic 3.5 and PHASER-CE, I recently bought the VIrtualJoystick and when trying to implement I'm getting the error: this.game undefined. ERROR ( core.es5.js:1084 ERROR TypeError: Cannot set property 'game' of undefined at Phaser.PluginManager.add (phaser-split.js:8917) at Fogo.webpackJsonp.274.Fogo.create ( ) Can you give me some help on how to implement this plugin. PS, it's all in typescript create() { this.game.plugins.add(Phaser.Plugin.VirtualJoystick); } Thank you for your attention, I'm sorry, my English, because I'm in Brazil and my language is PT-BR Link to comment Share on other sites More sharing options...
jjwallace Posted August 14, 2017 Share Posted August 14, 2017 Sounds like a scoping issue, have you tried removing game and just using 'this' Link to comment Share on other sites More sharing options...
Adalberto Posted August 14, 2017 Author Share Posted August 14, 2017 Good evening. I was able to solve the problem, I had to change the plugin to refer to: Phaser.Plugin.VirtualJoystick, since it was referring to: Phaser.VirtualJoystick Thank you very much. Link to comment Share on other sites More sharing options...
Recommended Posts