sis.js 450 B

1234567891011121314151617181920212223
  1. $(document).ready(function() {
  2. $('#startBtn').on('click', function(event) {
  3. Game.running = false;
  4. Game.wave_index = -1;
  5. Game.wave = undefined;
  6. Game.aliens = [];
  7. Game.ship = null;
  8. Game.score = 0;
  9. Game.shots = {
  10. total : 0,
  11. lost : 0
  12. };
  13. Game.init();
  14. $.loadCallback(function(percent){
  15. $("#loadingBar").width(400*percent);
  16. });
  17. $.playground().startGame(
  18. function() {
  19. $("#welcomeScreen").remove();
  20. }
  21. );
  22. });
  23. });