app/scripts/core/gameCoordinator.js
/**
   * Displays GAME OVER text and displays the menu so players can play again
   */
Displays GAME OVER text and displays the menu so players can play again
Displays GAME OVER text and displays the menu so players can play again
gameOver() {
    new Timer(() => {
      this.displayText(
        {
          left: this.scaledTileSize * 9,
          top: this.scaledTileSize * 16.5,
        },
        'gameOver',
        4000,
        this.scaledTileSize * 10,
        this.scaledTileSize * 2,
      );
      this.fruit.hideFruit();
      new Timer(() => {
        this.leftCover.style.left = '0';
        this.rightCover.style.right = '0';
        setTimeout(() => {
          this.mainMenu.style.opacity = 1;
          this.gameStartButton.disabled = false;
          this.mainMenu.style.visibility = 'visible';
        }, 1000);
      }, 2500);
    }, 2250);
  }
gameOver ( ) { new Timer ( ( ) => { this . displayText ( { left : this . scaledTileSize * 9 , top : this . scaledTileSize * 16.5 , } , 'gameOver' , 4000 , this . scaledTileSize * 10 , this . scaledTileSize * 2 , ) ; this . fruit . hideFruit ( ) ; new Timer ( ( ) => { this . leftCover . style . left = '0' ; this . rightCover . style . right = '0' ; setTimeout ( ( ) => { this . mainMenu . style . opacity = 1 ; this . gameStartButton . disabled = false ; this . mainMenu . style . visibility = 'visible' ; } , 1000 ) ; } , 2500 ) ; } , 2250 ) ; }
Displays GAME OVER text and displays the menu so players can play again
Displays GAME OVER text and displays the menu so players can play again