So I’m having some trouble adjusting to classes and objects in JS. Sorry for the newb question, but how do I make the call to add an image when I have a function inside Create?
class GameScene extends Phaser.Scene{
constructor(){etc.}
preload(){
this.load.image(‘img’, ‘img.png’);
}
create(){
function insideCreate(){
let myImage = this.add.image(x, y, 'img'); //"this" is undefined. "game" is undefined. "this.game" is undefined. GameScene.add.image is undefined...
}