Skip to content

Commit

Permalink
Created persons, invisibles for hotel. Fixed bug where a text display…
Browse files Browse the repository at this point in the history
… right after another text display would freeze.
  • Loading branch information
vincentrolfs committed Dec 20, 2016
1 parent af8413b commit b17757f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
43 changes: 41 additions & 2 deletions js/add_maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,46 @@ zuk.addMap({
// Format: [x_on_current_map, y_on_current_map, name_of_new_map]

],
invisibles: [],
persons: []
invisibles: [{
x: 40,
y: 80,
interact: function(){
zuk_ui.displayText("Wir wünschen Ihnen einen angenehmen Aufenthalt!");
}
}],
persons: [{
x: 40,
y: 48,
sheet: "claire"
},
{
x: 216,
y: 48,
sheet: "police",
interact: function(){
zuk_ui.displayText("Kein Zimmer? Kein Zutritt!");
},
},
{
x: 200,
y: 48,
sheet: "police",
interact: function(){
zuk_ui.displayText(["Hier dürfen leider nur Gäste passieren.", "Wir bitten um Ihr Verständnis."]);
}
},
{
x: 88,
y: 176,
sheet: "max",
interact: function(){
zuk_ui.displayText(["Ich bin der Rätselmeister.", "Mir ist zu Ohren gekommen,", "dass du ins Regierungsgebäude willst.", "Dabei kann ich dir helfen!", "Aber vorher musst du mein Rätsel lösen!", "Wenn ich in der Mitte steh,", "Rechts ein e und links ein e," ,"Rage ich als stolzer Baum,", "Hoch empor in Waldes Raum.", "Was bin ich?"], function(){
var answer = prompt().replace(/\s+/g, "").toLowerCase();
var response = (answer === atob("ZWljaGU="))? "Das ist korrekt!" : "Nein, leider nicht...";
zuk_ui.displayText(response);
});
}
}]

});

Expand All @@ -28,6 +66,7 @@ zuk.addMap({
loadingPoints: {

default: [360, 544, "up", true],
hotel: [584, 272, "down", true]
// Format: [x, y(, dir)(, isDoor)]

},
Expand Down
4 changes: 2 additions & 2 deletions js/classes/UIHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ Q.Class.extend("UIHandler", {

UIHandler.textContainer.p.hidden = true;

if (typeof callback == "function") callback();

if (autoChange){

window.clearInterval(timeoutInterval);
Expand All @@ -141,6 +139,8 @@ Q.Class.extend("UIHandler", {
Q.input.off("action", this);

}

if (typeof callback == "function") callback();

} else {

Expand Down
1 change: 1 addition & 0 deletions js/setup_quintus.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Q.input.keyboardControls({
X: "action",
Z: "action",
SPACE: "action",
ENTER: "action",
81: "action", // "Q"
69: "action", // "E"
87: "up", // "W"
Expand Down
2 changes: 1 addition & 1 deletion todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ todo
- when to use p
- used array.filter => browser support?
- rätsel: http://www.raetselstunde.de/text-raetsel/vers-raetsel/vers-raetsel-003.html
z.b: Wenn ich in der Mitte steh, rechts ein e und links ein e, rage ich als stolzer Baum hoch empor in des Waldes Raum.
- flags instead of acts?

0 comments on commit b17757f

Please sign in to comment.