I don't know, you should try to ask the news vendor.
+
I sold a copy to a guy not so long ago. He must be still around.
-
-
-
-
-move
+
+ Move around the park with the arrows ←↑↓→ and click on the people to ask them if they saw who left the newspaper on the bench.
+
@@ -56,7 +57,7 @@ move
// player moves
var $div = $('#player_img');
- var screenLeftMin = 0;
+ var screenLeftMin = 200;
var screenLeftMax = 870;
function adjustScroll() {
@@ -78,25 +79,55 @@ move
$(document).keydown(function(e) {
+ var offset = $div.position();
+ console.log("offset:", offset);
+
switch (e.which) {
case 37:
- $div.css('left', $div.offset().left - 20);
- e.preventDefault();
- adjustScroll();
- break;
+ /* $div.css('left', $div.offset().left - 20);*/
+ offset.left -= 20;
+ console.log("left");
+ break;
case 38:
- $div.css('top', $div.offset().top - 20);
+ // $div.css('top', $div.offset().top - 20);
+ offset.top -= 20;
+ console.log("top");
break;
case 39:
- $div.css('left', $div.offset().left + 20);
- e.preventDefault();
- adjustScroll();
+ //$div.css('left', $div.offset().left + 20);
+ offset.left += 20;
+ console.log("right");
break;
case 40:
- $div.css('top', $div.offset().top + 20);
+ //$div.css('top', $div.offset().top + 20);
+ offset.top += 20;
+ console.log("down");
break;
- }
+ }
+ //check the offset
+ if (offset.left < 0) {
+ offset.left = 0;
+ }
+ if (offset.left > $("#ground").width() - 50) {
+ offset.left = $("#ground").width() - 50;
+
+ }
+
+ if (offset.top < 0) {
+ offset.top = 0;
+ }
+ if (offset.top > $("#ground").height() - 100) {
+ offset.top = $("#ground").height() - 100;
+
+ }
+
+ $div.css("left", offset.left);
+ $div.css("top", offset.top);
+ e.preventDefault();
+ adjustScroll();
+
})
+
// saves game step in the local storage
window.onload = function() {
@@ -112,13 +143,20 @@ $(document).keydown(function(e) {
player_img.appendChild(img);
//get player name from local storage
- document.querySelector('#player_name').innerHTML =localStorage.playerName;
+ $("#woman").click (function(){
+ $(".woman_bubble").toggle();
+ });
+
+ $("#newspaper_seller").click (function(){
+ $(".vendor_bubble").toggle();
+ });
-
+
+
\ No newline at end of file
diff --git a/tree/park_N.html b/tree/park_N.html
index 29890d1..40e6207 100644
--- a/tree/park_N.html
+++ b/tree/park_N.html
@@ -41,25 +41,13 @@
I don't know, you should try to ask the news vendor.
I sold a copy to a guy not so long ago. He must be still around.
-
...
-
...
-
I was hoping that someone would find my newspaper
-
My name is Ned, I used to be the school's janitor. I got fired last week because the school noticed I was carrying on some investigations on the kid's conditions there. Believe me, the situation is shadier than it seems. Do you wanna know what I just found out?
-
The school is involved in sinister activities: together with the Monteferro Food Enterprise they are poisoning the children's meals. Follow me to the enterprise's headquarter: I can show you the proof of what I'm saying
- Move around the park with the arrows ←↑↓→ and click on the people to ask them if they saw the owner of the newspaper.
+ Move around the park with the arrows ←↑↓→ and click on the people to ask them if they saw who left the newspaper on the bench.