feat: add background

This commit is contained in:
Renge 2022-05-09 16:41:36 -04:00
parent c2617f531c
commit 650769fc01

View File

@ -31,7 +31,7 @@ export default class MainMenu extends Scene {
loadScene(): void { loadScene(): void {
// Load the menu song // Load the menu song
//this.load.audio("menu", "shattered_sword_assets/music/menu.mp3"); this.load.image("backgroud", "shattered_sword_assets/images/mainmenu.png");
} }
//TODO //TODO
@ -44,6 +44,7 @@ export default class MainMenu extends Scene {
// The main menu // The main menu
this.mainMenu = this.addUILayer("mainMenu"); this.mainMenu = this.addUILayer("mainMenu");
this.add.sprite("background", "mainMenu");
const seedHint = <Label>this.add.uiElement(UIElementType.LABEL, "mainMenu", {position: new Vec2(center.x, center.y - 200), text: "Enter seed or leave it blank to randomly generate one"}); const seedHint = <Label>this.add.uiElement(UIElementType.LABEL, "mainMenu", {position: new Vec2(center.x, center.y - 200), text: "Enter seed or leave it blank to randomly generate one"});
seedHint.textColor = Color.WHITE; seedHint.textColor = Color.WHITE;