I have been working on developing a game application using a combination of Ionic 2 with TypeScript and Phaser.io. Everything has been going well and the game is functioning properly, however there is one issue that I have encountered...
While I am able to trigger Phaser actions from within a TypeScript function, I am unable to do the reverse.
For instance, I have a score displayed in my HTML as {{ score }}
. In my TypeScript controller, I initialize this score with this.score = 0;
. Although I can update the score within a TypeScript function, it does not seem to work within any Phaser functions such as preload, create, update, or render. An example showcasing this problem is depicted in the image below (a simplified version of my code).
Appreciate any assistance you can provide.