{"size": 622, "ext": "js", "max_stars_repo_path": "js/menu.js", "max_stars_repo_name": "SMMC-Digital-Technology/GAME_2020_1_Doom", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/menu.js", "max_issues_repo_name": "SMMC-Digital-Technology/GAME_2020_1_Doom", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/menu.js", "max_forks_repo_name": "SMMC-Digital-Technology/GAME_2020_1_Doom", "max_forks_repo_forks_event_min_datetime": "2020-05-26T00:46:54.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-26T00:46:54.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 24.88, "max_line_length": 77, "alphanum_fraction": 0.6688102894}
/**
 * Displays a game menu
 * use game.state.start('level1') to go level1State
 */
var menuState = {
   create: function() {
      // create the scene
  background = game.add.image(0, 0, "background");
  background.scale.setTo(800/132,600/132);
  button = game.add.button(game.world.centerX, game.world.centerY, 'button');
  button.anchor.setTo(0.5, 0.3);
  button.onInputUp.add(this.startGame);
  var text = game.add.text(button.x, button.y, 'Start Game');
  text.anchor.setTo(0.5, 0.5);
},


startGame: function() {
 game.global.score = 0;
 game.global.lives = game.global.maxLives;
 game.state.start("level1");

},
};
