I am trying to get an image to appear on the screen, but all that shows is the green box with the slash through it. I have
this.load.image('ace', 'assets/ace.png');
in my ‘create()’ function, and
this.add.image(100, 100, 'ace');
in my ‘update()’ function. As I said, the green box shows at coordinates (100, 100)…why isn’t the image loading? I’ve tried every file path I can think of (e.g. ‘./assets/ace.png’, ./src/assets/ace.png’, etc.) but nothing works. My file structure is
index.html
src/
index.js
assets/
ace.png
Any help is much appreciated!