|
|
@ -9,35 +9,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
|
<button id="final_test" onclick="location.href='final.html';">go to final test </button>
|
|
|
|
|
|
|
|
<!--baloons -->
|
|
|
|
<!--baloons -->
|
|
|
|
<div class="comment1stpage baloons"id="baloon1" style="display: none;">
|
|
|
|
<div class="baloons_all">
|
|
|
|
<p class="text_baloon1">
|
|
|
|
<div class="comment1stpage baloons"id="baloon1" style="display: none;">
|
|
|
|
It looks like the previous owner of the newspaper highlighted something
|
|
|
|
<p class="text_baloon1">
|
|
|
|
</p>
|
|
|
|
It looks like the previous owner of the newspaper highlighted something
|
|
|
|
</div>
|
|
|
|
</p>
|
|
|
|
<div class="comment1stpage baloons"id="baloon2" style="display: none;">
|
|
|
|
</div>
|
|
|
|
<p class="text_baloon1"></p>
|
|
|
|
<div class="comment1stpage baloons"id="baloon2" style="display: none;">
|
|
|
|
Who is N.?
|
|
|
|
<p class="text_baloon1"></p>
|
|
|
|
</p>
|
|
|
|
Who is N.?
|
|
|
|
</div>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="comment2stpage baloons"id="baloon3" style="display: none;">
|
|
|
|
<div class="comment2stpage baloons"id="baloon3" style="display: none;">
|
|
|
|
<p class="text_baloon3">
|
|
|
|
<p class="text_baloon3">
|
|
|
|
Amanda often volunteers for the cat shelter.<br>
|
|
|
|
Amanda often volunteers for the cat shelter.<br>
|
|
|
|
Can this be the reason why she is late?
|
|
|
|
Can this be the reason why she is late?
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="comment2stpage baloons"id="baloon4" style="display: none;">
|
|
|
|
<div class="comment2stpage baloons"id="baloon4" style="display: none;">
|
|
|
|
<p class="text_baloon4"></p>
|
|
|
|
<p class="text_baloon4"></p>
|
|
|
|
I hope Amanda will arrive soon, <br>
|
|
|
|
I hope Amanda will arrive soon, <br>
|
|
|
|
you still have to purchase the tickets!
|
|
|
|
you still have to purchase the tickets!
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="newspaper_wrap">
|
|
|
|
|
|
|
|
<button class="close" style="display: none;"><span class="button_text">close</span></button>
|
|
|
|
<!--newspaper pages -->
|
|
|
|
<!--newspaper pages -->
|
|
|
|
|
|
|
|
|
|
|
|
<button id="close_news"style="display: none;"><span class="button_text">close</span></button>
|
|
|
|
|
|
|
|
<div id="newspaper" style="display: none;">
|
|
|
|
<div id="newspaper" style="display: none;">
|
|
|
|
<div class="left_page">
|
|
|
|
<div class="left_page">
|
|
|
|
|
|
|
|
|
|
|
@ -96,25 +98,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="groundline"></div>
|
|
|
|
<div id="groundline"></div>
|
|
|
|
<div id="player_img"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="ground">
|
|
|
|
|
|
|
|
<div id="player_img"></div>
|
|
|
|
|
|
|
|
<img id="bench" src="imgs/park/bench1.gif" height="20%">
|
|
|
|
|
|
|
|
<img id="tree1" src="imgs/park/tree1.gif" height="30%">
|
|
|
|
|
|
|
|
<img id="tree2" src="imgs/park/tree4.gif" height="25%">
|
|
|
|
|
|
|
|
<img id="tree3" src="imgs/park/tree4.gif" height="25%">
|
|
|
|
|
|
|
|
<img id="newspaperimg" src="imgs/park/newspaper2.gif" height="7%">
|
|
|
|
|
|
|
|
<img id="flower1" src="imgs/park/flower1.gif" height="5%">
|
|
|
|
|
|
|
|
<img id="flower2" src="imgs/park/flower3.gif" height="7%">
|
|
|
|
|
|
|
|
<img id="flower3" src="imgs/park/flower3.1.gif" height="6%">
|
|
|
|
|
|
|
|
<img id="flower4" src="imgs/park/flower1.1.gif" height="5%">
|
|
|
|
|
|
|
|
<img id="flower5" src="imgs/park/flower1.gif" height="5%">
|
|
|
|
|
|
|
|
<img id="grass1" src="imgs/park/grass1.gif" height="75vw">
|
|
|
|
|
|
|
|
<img id="grass2" src="imgs/park/grass1.gif" height="75vw">
|
|
|
|
|
|
|
|
<img id="statue" src="imgs/park/statue.gif" height="20%">
|
|
|
|
|
|
|
|
<img id="tree4" src="imgs/park/tree4.gif" height="25%">
|
|
|
|
|
|
|
|
<img id="flower6" src="imgs/park/flower1.1.gif" height="5%">
|
|
|
|
|
|
|
|
<img id="dog" src="imgs/park/dog1.gif" height="10%">
|
|
|
|
|
|
|
|
<img id="kiosk" src="imgs/park/stand3.gif" height="20%">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<img id="bench" src="imgs/park/bench1.gif" height="20%">
|
|
|
|
|
|
|
|
<img id="tree1" src="imgs/park/tree1.gif" height="30%">
|
|
|
|
|
|
|
|
<img id="tree2" src="imgs/park/tree4.gif" height="25%">
|
|
|
|
|
|
|
|
<img id="tree3" src="imgs/park/tree4.gif" height="25%">
|
|
|
|
|
|
|
|
<img id="newspaperimg" src="imgs/park/newspaper2.gif" height="7%">
|
|
|
|
|
|
|
|
<img id="flower1" src="imgs/park/flower1.gif" height="5%">
|
|
|
|
|
|
|
|
<img id="flower2" src="imgs/park/flower3.gif" height="7%">
|
|
|
|
|
|
|
|
<img id="flower3" src="imgs/park/flower3.1.gif" height="6%">
|
|
|
|
|
|
|
|
<img id="flower4" src="imgs/park/flower1.1.gif" height="5%">
|
|
|
|
|
|
|
|
<img id="flower5" src="imgs/park/flower1.gif" height="5%">
|
|
|
|
|
|
|
|
<img id="grass1" src="imgs/park/grass1.gif" height="75vw">
|
|
|
|
|
|
|
|
<img id="grass2" src="imgs/park/grass1.gif" height="75vw">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -138,22 +149,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
<script src="jquery.min.js"></script>
|
|
|
|
<script src="jquery.min.js"></script>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
// player moves
|
|
|
|
|
|
|
|
|
|
|
|
//move
|
|
|
|
|
|
|
|
var $div = $('#player_img');
|
|
|
|
var $div = $('#player_img');
|
|
|
|
|
|
|
|
var screenLeftMin = 200;
|
|
|
|
|
|
|
|
var screenLeftMax = 870;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function adjustScroll() {
|
|
|
|
|
|
|
|
var playerLeft = parseInt($div.css("left"));
|
|
|
|
|
|
|
|
var scrollLeft = $(document).scrollLeft();
|
|
|
|
|
|
|
|
var screenLeft = playerLeft - scrollLeft;
|
|
|
|
|
|
|
|
console.log ("screenleft:", screenLeft);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (screenLeft > screenLeftMax ) {
|
|
|
|
|
|
|
|
$(document).scrollLeft(playerLeft - screenLeftMax)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (screenLeft < screenLeftMin ) {
|
|
|
|
|
|
|
|
$(document).scrollLeft(playerLeft - screenLeftMin)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(document).keydown(function(e) {
|
|
|
|
$(document).keydown(function(e) {
|
|
|
|
switch (e.which) {
|
|
|
|
switch (e.which) {
|
|
|
|
case 37:
|
|
|
|
case 37:
|
|
|
|
$div.css('left', $div.offset().left - 20);
|
|
|
|
$div.css('left', $div.offset().left - 20);
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
adjustScroll();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 38:
|
|
|
|
case 38:
|
|
|
|
$div.css('top', $div.offset().top - 20);
|
|
|
|
$div.css('top', $div.offset().top - 20);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 39:
|
|
|
|
case 39:
|
|
|
|
$div.css('left', $div.offset().left + 20);
|
|
|
|
$div.css('left', $div.offset().left + 20);
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
adjustScroll();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 40:
|
|
|
|
case 40:
|
|
|
|
$div.css('top', $div.offset().top + 20);
|
|
|
|
$div.css('top', $div.offset().top + 20);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -175,7 +208,7 @@ $(document).keydown(function(e) {
|
|
|
|
// open newspaper
|
|
|
|
// open newspaper
|
|
|
|
|
|
|
|
|
|
|
|
$(".open_newspaper_index").click (function(){
|
|
|
|
$(".open_newspaper_index").click (function(){
|
|
|
|
$("#newspaper, #close_news").toggle();
|
|
|
|
$("#newspaper, .close").toggle();
|
|
|
|
//saves that u opened the newspaper in the local storage
|
|
|
|
//saves that u opened the newspaper in the local storage
|
|
|
|
window.localStorage.setItem("newspaper","opened")
|
|
|
|
window.localStorage.setItem("newspaper","opened")
|
|
|
|
console.log ("newspaper:",localStorage.newspaper)
|
|
|
|
console.log ("newspaper:",localStorage.newspaper)
|
|
|
@ -189,7 +222,7 @@ $(document).keydown(function(e) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#arrow_back1").click (function(){
|
|
|
|
$("#arrow_back1").click (function(){
|
|
|
|
$("#baloon1, #baloon2, #baloon3, #baloon4, .school2,.school3").hide();
|
|
|
|
$("#baloon1, #baloon2, #baloon3, #baloon4, .school2,.school3, .message2").hide();
|
|
|
|
$(".index, .school1, .message4").show();
|
|
|
|
$(".index, .school1, .message4").show();
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -225,9 +258,9 @@ $(document).keydown(function(e) {
|
|
|
|
$(".message4").show();
|
|
|
|
$(".message4").show();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#close_news").click (function(){
|
|
|
|
$(".close").click (function(){
|
|
|
|
$("#newspaper").hide();
|
|
|
|
$("#newspaper").hide();
|
|
|
|
$("#close_news").hide();
|
|
|
|
$(".close").hide();
|
|
|
|
$("#baloon1").hide();
|
|
|
|
$("#baloon1").hide();
|
|
|
|
$("#baloon2").hide();
|
|
|
|
$("#baloon2").hide();
|
|
|
|
$("#baloon3").hide();
|
|
|
|
$("#baloon3").hide();
|
|
|
|