|
|
|
@ -9,35 +9,37 @@
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<button id="final_test" onclick="location.href='final.html';">go to final test </button>
|
|
|
|
|
<!--baloons -->
|
|
|
|
|
<div class="comment1stpage baloons"id="baloon1" style="display: none;">
|
|
|
|
|
<p class="text_baloon1">
|
|
|
|
|
It looks like the previous owner of the newspaper highlighted something
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="comment1stpage baloons"id="baloon2" style="display: none;">
|
|
|
|
|
<p class="text_baloon1"></p>
|
|
|
|
|
Who is N.?
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="baloons_all">
|
|
|
|
|
<div class="comment1stpage baloons"id="baloon1" style="display: none;">
|
|
|
|
|
<p class="text_baloon1">
|
|
|
|
|
It looks like the previous owner of the newspaper highlighted something
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="comment1stpage baloons"id="baloon2" style="display: none;">
|
|
|
|
|
<p class="text_baloon1"></p>
|
|
|
|
|
Who is N.?
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="comment2stpage baloons"id="baloon3" style="display: none;">
|
|
|
|
|
<p class="text_baloon3">
|
|
|
|
|
Amanda often volunteers for the cat shelter.<br>
|
|
|
|
|
Can this be the reason why she is late?
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="comment2stpage baloons"id="baloon4" style="display: none;">
|
|
|
|
|
<p class="text_baloon4"></p>
|
|
|
|
|
I hope Amanda will arrive soon, <br>
|
|
|
|
|
you still have to purchase the tickets!
|
|
|
|
|
</p>
|
|
|
|
|
<div class="comment2stpage baloons"id="baloon3" style="display: none;">
|
|
|
|
|
<p class="text_baloon3">
|
|
|
|
|
Amanda often volunteers for the cat shelter.<br>
|
|
|
|
|
Can this be the reason why she is late?
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="comment2stpage baloons"id="baloon4" style="display: none;">
|
|
|
|
|
<p class="text_baloon4"></p>
|
|
|
|
|
I hope Amanda will arrive soon, <br>
|
|
|
|
|
you still have to purchase the tickets!
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!--newspaper pages -->
|
|
|
|
|
|
|
|
|
|
<button id="close_news"style="display: none;"><span class="button_text">close</span></button>
|
|
|
|
|
<div class="newspaper_wrap">
|
|
|
|
|
<button class="close" style="display: none;"><span class="button_text">close</span></button>
|
|
|
|
|
<!--newspaper pages -->
|
|
|
|
|
|
|
|
|
|
<div id="newspaper" style="display: none;">
|
|
|
|
|
<div class="left_page">
|
|
|
|
|
|
|
|
|
@ -96,26 +98,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="groundline"></div>
|
|
|
|
|
<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">
|
|
|
|
|
<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%">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="text_container">
|
|
|
|
@ -138,22 +149,44 @@
|
|
|
|
|
|
|
|
|
|
<script src="jquery.min.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
//move
|
|
|
|
|
// player moves
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
|
|
switch (e.which) {
|
|
|
|
|
case 37:
|
|
|
|
|
$div.css('left', $div.offset().left - 20);
|
|
|
|
|
$div.css('left', $div.offset().left - 20);
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
adjustScroll();
|
|
|
|
|
break;
|
|
|
|
|
case 38:
|
|
|
|
|
$div.css('top', $div.offset().top - 20);
|
|
|
|
|
$div.css('top', $div.offset().top - 20);
|
|
|
|
|
break;
|
|
|
|
|
case 39:
|
|
|
|
|
$div.css('left', $div.offset().left + 20);
|
|
|
|
|
$div.css('left', $div.offset().left + 20);
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
adjustScroll();
|
|
|
|
|
break;
|
|
|
|
|
case 40:
|
|
|
|
|
$div.css('top', $div.offset().top + 20);
|
|
|
|
|
$div.css('top', $div.offset().top + 20);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -175,7 +208,7 @@ $(document).keydown(function(e) {
|
|
|
|
|
// open newspaper
|
|
|
|
|
|
|
|
|
|
$(".open_newspaper_index").click (function(){
|
|
|
|
|
$("#newspaper, #close_news").toggle();
|
|
|
|
|
$("#newspaper, .close").toggle();
|
|
|
|
|
//saves that u opened the newspaper in the local storage
|
|
|
|
|
window.localStorage.setItem("newspaper","opened")
|
|
|
|
|
console.log ("newspaper:",localStorage.newspaper)
|
|
|
|
@ -189,7 +222,7 @@ $(document).keydown(function(e) {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#arrow_back1").click (function(){
|
|
|
|
|
$("#baloon1, #baloon2, #baloon3, #baloon4, .school2,.school3").hide();
|
|
|
|
|
$("#baloon1, #baloon2, #baloon3, #baloon4, .school2,.school3, .message2").hide();
|
|
|
|
|
$(".index, .school1, .message4").show();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
@ -225,9 +258,9 @@ $(document).keydown(function(e) {
|
|
|
|
|
$(".message4").show();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#close_news").click (function(){
|
|
|
|
|
$(".close").click (function(){
|
|
|
|
|
$("#newspaper").hide();
|
|
|
|
|
$("#close_news").hide();
|
|
|
|
|
$(".close").hide();
|
|
|
|
|
$("#baloon1").hide();
|
|
|
|
|
$("#baloon2").hide();
|
|
|
|
|
$("#baloon3").hide();
|
|
|
|
|