Kinda new to Phaser, got a simple script running when I open the HTML file, so I put those on my phone and open it and it’s just a white screen =*( I just want to know what is the most bare bones way to make it work on phone.
Scene1 = {
key: 'Scene1',
preload: function () {
a = 0;
bg = this.add.rectangle(275, 275, 550, 550, 0x00ff00);
},
create: function () {
title = this.add.text(225, 225, 'STARTER');
},
update: function () {
if (a == 12) title.setColor('white');
if (a == 12) a = 0;
if (a == 8) title.setColor('blue');
if (a == 4) title.setColor('red');
a++;
},
};
config = {
type: Phaser.AUTO,
width: 550,
height: 550,
physics: { default: 'arcade' },
parent: 'game-container',
dom: { createContainer: true },
scene: [Scene1],
};
game = new Phaser.Game(config);