dialog() {
    if (player.livesLeft < 0) {
      allEnemies = [];
      $('#lives').html('0');
      // this.allEnemies = [];
      vex.dialog.confirm({
        message: `You made it to level ${player.level}! Do you want to play again?`,
        callback: function(value) {
          if (value) {
            window.location.reload(true); // Reset (refresh) page to reset(hacky)
          }
        }
      });
    }
  }
// This modal shows when life count has been depleted
This modal shows when life count has been depleted
This modal shows when life count has been depleted
dialog() {
    if (player.livesLeft < 0) {
      allEnemies = [];
      $('#lives').html('0');
      vex.dialog.confirm({
        message: `You made it to level ${player.level}! Do you want to play again?`,
        callback: function(value) {
          if (value) {
            window.location.reload(true); 
          }
        }
      });
    }
  }
dialog ( ) { if ( player . livesLeft < 0 ) { allEnemies = [ ] ; $ ( '#lives' ) . html ( '0' ) ; vex . dialog . confirm ( { message : ` ${ player . level } ` , callback : function ( value ) { if ( value ) { window . location . reload ( true ) ; } } } ) ; } }
This modal shows when life count has been depleted
This modal shows when life count has been depleted
// this.allEnemies = []; // Reset (refresh) page to reset(hacky)