preload ()
{
this.load.image('pic', 'assets/pics/a-new-link-to-the-past-by-ptimm.jpg');
this.load.image('logo', 'assets/sprites/phaser3-logo.png');
}
create ()
{
this.add.image(400, 300, 'pic');
this.logo = this.add.image(400, 200, 'logo')
.setVisible(false);
this.cameras.main.on('camerafadeoutstart', function () {
this.logo.setVisible(true);
}, this);
this.cameras.main.on('camerafadeoutcomplete', function () {
this.logo.setVisible(false);
}, this);
this.input.on('pointerdown', function () {
var red = Phaser.Math.Between(50, 255);
var green = Phaser.Math.Between(50, 255);
var blue = Phaser.Math.Between(50, 255);
this.cameras.main.fade(2000, red, green, blue);
}, this);
}