master
*anna* 4 years ago
parent d7cdd8de91
commit b382ba6d21

@ -48,11 +48,19 @@
#player_img { #player_img {
bottom: 35%; bottom: 35%;
left: 35%; left: 35%;
position:absolute; position:absolute ;
z-index: 20; z-index: 20;
} }
#ground{
position:relative ;
width:4000px;
}
#groundline { #groundline {
position: fixed; position: fixed;
bottom:0px; bottom:0px;

@ -189,16 +189,9 @@ $(document).keydown(function(e) {
}); });
$("#arrow_back1").click (function(){ $("#arrow_back1").click (function(){
$("#baloon1").hide(); $("#baloon1, #baloon2, #baloon3, #baloon4, .school2,.school3").hide();
$("#baloon2").hide(); $(".index, .school1, .message4").show();
$(".school2").hide();
$(".message2").hide();
$(".school3").hide();
$("#baloon3").hide();
$("#baloon4").hide();
$(".index").show();
$(".school1").show();
$(".message4").show();
}); });
$("#arrow_go2").click (function(){ $("#arrow_go2").click (function(){

@ -19,6 +19,10 @@
<div id="player_img"></div> <div id="player_img"></div>
<div id="ground">
<img id="bench" src="imgs/park/bench1.gif" height="20%"> <img id="bench" src="imgs/park/bench1.gif" height="20%">
@ -35,6 +39,9 @@
<img id="grass2" src="imgs/park/grass1.gif" height="75vw"> <img id="grass2" src="imgs/park/grass1.gif" height="75vw">
</div>
@ -46,8 +53,10 @@ move
<script src="jquery.min.js"></script> <script src="jquery.min.js"></script>
<script> <script>
//move // player moves
var $div = $('#player_img'); var $div = $('#player_img');
$(document).keydown(function(e) { $(document).keydown(function(e) {
switch (e.which) { switch (e.which) {
case 37: case 37:
@ -64,6 +73,13 @@ $(document).keydown(function(e) {
break; break;
} }
}) })
// saves game step in the local storage
window.onload = function() {
window.localStorage.setItem("looking_for_N","opened")
console.log ("looking for N:",localStorage.looking_for_N)
}
//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");

Loading…
Cancel
Save