@ -229,11 +229,22 @@
console.log ("park:",localStorage.park)
document.querySelector('#player_name').innerHTML = localStorage.playerName;
//exhibition setting - deletes previous history everytime the journey starts again
var avatar_image = localStorage.getItem('myavatar');
console.log(avatar_image);
var avatar_name = localStorage.getItem('playerName');
console.log(avatar_name);
localStorage.clear();
localStorage.setItem('myavatar',avatar_image);
localStorage.setItem('playerName',avatar_name);
window.localStorage.setItem("park","opened")
console.log ("park:",localStorage.park)
document.querySelector('#player_name').innerHTML = localStorage.playerName;
if (localStorage.final === "opened" ) {
//ordinary setting : asks the player whether they want to remove their history or not
/*
if (localStorage.final === "opened" ) {
$(".memory").show();
$(".text_container").hide();
$(".blur, .blur_button ").addClass("blur_background");
@ -260,13 +271,15 @@
document.querySelector('#player_name').innerHTML = localStorage.playerName;
});
}
*/
}
// open newspaper
$("#bench").click (function(){
click.play();
$(".message1, .message4, .message5, .bubble1, .bubble2").hide();
$("#newspaper, .close").show();
$(".message1, .message4, .message5, .bubble1, .bubble2, .school2, .school3, .school4, .school5, #arrow_back1 ").hide();
$("#newspaper, .close, .index, .school1 ").show();
$(".blur, .blur_button"). addClass("blur_background");
//saves that u opened the newspaper in the local storage
window.localStorage.setItem("newspaper","opened")
@ -277,8 +290,8 @@
$("#arrow_go1").click (function(){
page.play();
$(".index, .school1, .message1, .message4 ").hide();
$(".school2, .school3, #baloon1, #baloon2").show();
$(".index, .school1, .message1, .message4").hide();
$(".school2, .school3, #baloon1, #baloon2, #arrow_back1 ").show();
});
$("#arrow_back1").click (function(){
@ -331,7 +344,7 @@
$("#baloon4").hide();
$(".message1").hide();
$(".message4").show();
$(".blur, .blur_button"). removeClass("blur_background");
$(".blur, .blur_button").removeClass("blur_background");
$("#kiosk ").show();
});