@@ -0,0 +1,26 @@
|
|||||||
|
import logoImg from "../assets/logo.png";
|
||||||
|
|
||||||
|
export default class Menu extends Phaser.Scene {
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super("Menu");
|
||||||
|
}
|
||||||
|
|
||||||
|
preload() {
|
||||||
|
this.load.image("logo", logoImg);
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const logo = this.add.image(this.cameras.main.centerX, this.cameras.main.centerY * 1.5, "logo").setOrigin(0.5, 0.5);
|
||||||
|
|
||||||
|
this.tweens.add({
|
||||||
|
targets: logo,
|
||||||
|
y: this.cameras.main.centerY,
|
||||||
|
duration: 2000,
|
||||||
|
ease: "Power2",
|
||||||
|
yoyo: true,
|
||||||
|
loop: -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user