Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion src/scenes/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ class Menu extends Phaser.Scene {
}

create(){
let textConfig = {
fontFamily: 'Courier',
fontSize: '28px',
//backgroundColor: '#F3B141',
color: '#FF7F50',
align: 'center',
padding: {
top: 5,
bototm: 5,
},
stroke: '#000000',
strokeThickness: 5,
fixedWidth: 0
}

this.background = this.add.tileSprite(0, 0, 300, 256, 'bg').setOrigin(0,0).setScale(3,3.5);

this.button = this.add.image(game.canvas.width/2, game.canvas.height/2, 'button', 1);
Expand All @@ -19,7 +34,24 @@ class Menu extends Phaser.Scene {
title.setFontSize(100);
this.start = false;

let centerX = game.config.width/2;
let centerY = game.config.height/2;
let textSpacer = 48;


// game instructions text
this.add.text(centerX, centerY + 3 * textSpacer, 'Move with the Arrow Keys (←)(→)', textConfig).setOrigin(0.5);
// this.add.text(centerX, centerY + 3 * textSpacer, 'Press (Q) to Break Through Webs', textConfig).setOrigin(0.5);
// Goal text
textConfig.color = '#FFFF66';
this.add.text(centerX, centerY + 4 * textSpacer, '>> Avoid the Bird <<', textConfig).setOrigin(0.5);
// credits line text
textConfig.color = '#5F9EA0';
textConfig.fontSize= '14px';
this.add.text(centerX, centerY + 7 * textSpacer, 'Game by Skyler Haataja, Marlene Lopez, and Daniel Wild', textConfig).setOrigin(0.5)

}

update(){
if(this.start == true){
this.scene.start('playScene');
Expand All @@ -42,4 +74,4 @@ class Menu extends Phaser.Scene {

}

}
}