Say I have a simple class:
class SimpleGame {
game: Phaser.Game;
myColor: Phaser.Color;
constructor() {
this.myColor = Phaser.Color.createColor(255,255,0);
this.game = new Phaser.Game(1200, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create});
}
preload(){
this.game.load.image("platform", "Graphics/platform.png");
}
create() {
console.log(this.myColor);
}
}
window.onload = () => {
var game = new SimpleGame();
};
The console always prints/returns undefined and if I try to modify the valu