Skip to content

Commit

Permalink
gameover text behind player
Browse files Browse the repository at this point in the history
  • Loading branch information
SamanthaSmith04 committed Oct 7, 2024
1 parent d035f84 commit 11c3aac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ function update() {
if (guardHit == true) {
gameOverMsg = this.physics.add.staticGroup();
gameOverMsg.create(380, CENTER_VERTICAL + 200, "GameOver").setScale(1.75);
gameOverMsg.setDepth(2);
player.setDepth(1);
for (i = 0; i < guards.length; i++){
guards[i].setDepth(1);
}
}
else if (document.getElementById('level-select').value != "6") {
NextLevelMsg = this.physics.add.staticGroup();
Expand Down

0 comments on commit 11c3aac

Please sign in to comment.