From 4326b2aa2a04a2432d2549dedbf6b41ed0d19a46 Mon Sep 17 00:00:00 2001 From: Matt Rasmus Date: Sun, 7 Jul 2013 11:41:51 -0700 Subject: [PATCH] Game fades to black at the end, and stays that way until the player clicks restart. --- script/space.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/script/space.js b/script/space.js index 4a3bf44..4dc7d80 100644 --- a/script/space.js +++ b/script/space.js @@ -369,9 +369,10 @@ var Space = { $('#locationSlider, #worldPanel, #spacePanel, #notifications').remove(); $('#header').empty(); setTimeout(function() { - $('body').removeClass('noMask').stop().animate({ + $('body').stop(); + $('#starsContainer').animate({ opacity: 0, - 'background-color': '#FFF' + 'background-color': '#000' }, { duration: 2000, progress: function() { @@ -381,18 +382,12 @@ var Space = { $('#notifyGradient').attr('style', 'background-color:'+cur+';background:-webkit-' + s + ';background:' + s); }, complete: function() { - $('#starsContainer, .deleteSave, .share').remove(); + $('#starsContainer').remove(); if(typeof Storage != 'undefined' && localStorage) { localStorage.clear(); } delete window.State; Engine.options = {}; - setTimeout(function() { - Engine.init(); - $('body').animate({ - opacity: 1 - }, 500, 'linear'); - }, 2000); } }); }, 2000);