xxxxxxxxxx
preload ()
{
this.load.image('robota', 'assets/pics/robota-uxo-by-made-of-bomb.jpg');
this.load.image('neuromancer', 'assets/pics/neuromancer.jpg');
}
create ()
{
this.add.image(400, 300, 'robota');
this.cameras.main.once('camerafadeoutcomplete', function (camera) {
this.add.image(400, 300, 'neuromancer');
camera.fadeIn(6000, 255);
}, this);
this.cameras.main.fadeOut(6000, 255);
}
xxxxxxxxxx
preload ()
{
this.load.image('robota', 'assets/pics/robota-uxo-by-made-of-bomb.jpg');
}
create ()
{
const image = this.add.image(900, 300, 'robota');
this.tweens.add({
targets: image,
x: 100,
ease: 'Sine.easeInOut',
yoyo: true,
repeat: -1,
duration: 3000
});
------------------------
this.cameras.main.once('camerafadeincomplete', function (camera) {
camera.fadeOut(6000);
});
this.cameras.main.fadeIn(6000);
}
-------------------------------------------------------------------------------
//Same as above only Change
this.cameras.main.once('camerafadeinstart', function (camera) {
camera.fadeOut(6000);
});
this.cameras.main.fadeIn(6000);
}