|
|
@ -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");
|
|
|
|