master
*anna* 4 years ago
parent d65aec5dfe
commit d8809e92a3

@ -73,11 +73,11 @@
<script> <script>
//get player avatar from local storage //get player avatar from local storage
console.log (localStorage.myavatar) /*console.log (localStorage.myavatar)
var img = document.createElement("img"); var img = document.createElement("img");
img.src = localStorage.myavatar; img.src = localStorage.myavatar;
var player_img = document.querySelector("#player_img"); var player_img = document.querySelector("#player_img");
player_img.appendChild(img); player_img.appendChild(img);*/
//store that you've been in the park //store that you've been in the park

Binary file not shown.

@ -113,10 +113,16 @@ you can press
<script> <script>
//clear local storage when back on the landing page //clear local storage when back on the landing page
/*
window.onload = function() { window.onload = function() {
window.localStorage.clear(); window.localStorage.clear();
} }*/
document.addEventListener("DOMContentLoaded", function () {
window.localStorage.clear();
console.log("loaded");
updateAvatar();
});
</script> </script>

@ -29,7 +29,6 @@ function updateAvatar () {
var avatar=fd.get("player_avatar") var avatar=fd.get("player_avatar")
console.log("avatar", avatar); console.log("avatar", avatar);
localStorage.myavatar=avatar; localStorage.myavatar=avatar;
} }
// store username in local storage + make sure the player added their preferences, if yes it redirect to the following page // store username in local storage + make sure the player added their preferences, if yes it redirect to the following page

@ -144,20 +144,23 @@ span.button_text{
padding-bottom: 5px; padding-bottom: 5px;
font-family: sinistre; font-family: sinistre;
background-color: white; background-color: white;
border: 0.11vw black solid; border: 1px black solid;
border-radius: 25vw; border-radius: 25vw;
color:black; color:black;
cursor:pointer; cursor:pointer;
font-size: 1.4vw; font-size: 1.4vw;
}
.glass_appear{
animation-name: appear; animation-name: appear;
animation-duration: 0.2s; animation-duration: 0.2s;
} }
@keyframes appear { @keyframes appear {
0% {top: 80px;} 0% {top: 80px;}
25% {top: 90px;} 25% {top: 85px;}
50% {top: 80px;} 50% {top: 80px;}
75% {top: 90px;} 75% {top: 95px;}
100% {top: 80px;} 100% {top: 80px;}
} }
@ -302,7 +305,7 @@ span.button_text{
} }
.bubble1 { .bubble1 {
right: 24%; right: 24%;
top:18%; bottom:54%;
position: absolute; position: absolute;
background: #ffffff; background: #ffffff;
color: #000000; color: #000000;
@ -345,7 +348,7 @@ span.button_text{
.bubble2 { .bubble2 {
right: 24%; right: 24%;
top:18%; bottom:54%;
position: absolute; position: absolute;
background: #ffffff; background: #ffffff;
color: #000000; color: #000000;

@ -165,7 +165,7 @@ $(document).keydown(function(e) {
break; break;
} }
//check the offset and prevent the character to exceed the screen dimension //check the offset and prevent the character from exceeding screen dimension
if (offset.left < 80) { if (offset.left < 80) {
offset.left = 80; offset.left = 80;
} }
@ -179,6 +179,7 @@ $(document).keydown(function(e) {
$('.bubble1').show(); $('.bubble1').show();
setTimeout( function() { setTimeout( function() {
$('.glasses_bar').show(); $('.glasses_bar').show();
$('.glasses_bar').addClass("glass_appear");
}, 3000); }, 3000);
}, 2000); }, 2000);
} }

Loading…
Cancel
Save