diff -ruN a/Engine/Globals.js b/Engine/Globals.js --- a/Engine/Globals.js +++ b/Engine/Globals.js @@ -81,12 +81,12 @@ try { // if we have local storage, show the punchlines in order. Otherwise, randomize if (localStorageSupported()) { - if (localStorage["punchlineIdx"] == undefined || isNaN(localStorage["punchlineIdx"])) - localStorage["punchlineIdx"] = 0; + if (localStorage["castleDefense.punchlineIdx"] == undefined || isNaN(localStorage["castleDefense.punchlineIdx"])) + localStorage["castleDefense.punchlineIdx"] = 0; - punchlineIdx = localStorage["punchlineIdx"]; + punchlineIdx = localStorage["castleDefense.punchlineIdx"]; - localStorage["punchlineIdx"] = (parseInt(localStorage["punchlineIdx"]) + 1) % PUNCHLINES.length; + localStorage["castleDefense.punchlineIdx"] = (parseInt(localStorage["castleDefense.punchlineIdx"]) + 1) % PUNCHLINES.length; } else punchlineIdx = Math.floor(Math.random() * PUNCHLINES.length); diff -ruN a/Engine/Highscore.js b/Engine/Highscore.js --- a/Engine/Highscore.js +++ b/Engine/Highscore.js @@ -19,10 +19,10 @@ loadHighscore = function () { if (localStorageSupported()) { try { - if (localStorage["topScore"] == undefined || isNaN(localStorage["topScore"])) - localStorage["topScore"] = 0; + if (localStorage["castleDefense.topScore"] == undefined || isNaN(localStorage["castleDefense.topScore"])) + localStorage["castleDefense.topScore"] = 0; - profile.topScore = parseInt(localStorage["topScore"]); + profile.topScore = parseInt(localStorage["castleDefense.topScore"]); } catch (e) { profile.topScore = 0; @@ -37,11 +37,11 @@ if (localStorageSupported()) { try { - if (localStorage["topScore"] == undefined || isNaN(localStorage["topScore"])) - localStorage["topScore"] = 0; + if (localStorage["castleDefense.topScore"] == undefined || isNaN(localStorage["castleDefense.topScore"])) + localStorage["castleDefense.topScore"] = 0; - if (parseInt(localStorage["topScore"]) < profile.score) - localStorage["topScore"] = profile.score; + if (parseInt(localStorage["castleDefense.topScore"]) < profile.score) + localStorage["castleDefense.topScore"] = profile.score; } catch (e) { }