From 394a86bdfcfd45137f1863ff303cee5cf7278b56 Mon Sep 17 00:00:00 2001 From: Tim Repke <timmothey@gmx.de> Date: Sun, 20 Sep 2015 23:07:34 +0200 Subject: [PATCH] fixed errors on mapchange --- .../view/signups/game1/js/game.js | 20 +++++++++++------- .../view/signups/game1/js/story.js | 2 ++ .../signups/game1/maps/castle_entrance.svg | Bin 586011 -> 585483 bytes 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/registration-system/view/signups/game1/js/game.js b/registration-system/view/signups/game1/js/game.js index 3730d4b..d2901b5 100644 --- a/registration-system/view/signups/game1/js/game.js +++ b/registration-system/view/signups/game1/js/game.js @@ -2,6 +2,7 @@ function Game(config) { if (!(this instanceof Game)) throw "'Game' needs to be constructed"; if (Game.instance) throw "'Game' already constructed"; Game.config = config; + Game.config.loopSpeed = 10; Game.instance = this; Game.achievements = new Achievements(); @@ -20,13 +21,16 @@ Game.prototype.run = function () { Game.prototype.nextMap = function (map, spawn) { clearInterval(Game.mainLoop); Game.mainLoop = null; - var gameRoot = document.getElementById("gameRoot"); - while (gameRoot.firstChild) { - gameRoot.removeChild(gameRoot.firstChild); - } - Game.char = null; - Game.cam = null; - this.loadMap(map, spawn); + var self = this; + setTimeout(function() { + var gameRoot = document.getElementById("gameRoot"); + while (gameRoot.firstChild) { + gameRoot.removeChild(gameRoot.firstChild); + } + Game.char = null; + Game.cam = null; + self.loadMap(map, spawn); + }, Game.config.loopSpeed+5); }; Game.prototype.loadMap = function (map, spawn) { @@ -126,7 +130,7 @@ Game.prototype.loadMap = function (map, spawn) { // cam movement Game.cam.movement(); } - }, 10); + }, Game.config.loopSpeed); } diff --git a/registration-system/view/signups/game1/js/story.js b/registration-system/view/signups/game1/js/story.js index e7a9613..3055470 100644 --- a/registration-system/view/signups/game1/js/story.js +++ b/registration-system/view/signups/game1/js/story.js @@ -90,6 +90,7 @@ Story.actions = { && Environment.progress.fs_firstApproach && Environment.progress.inventory_money; }, action: function () { + Story.actions.fs_exit_hint.state.hintGiven = true; Story.dialogueHelper([ { bubble: '#tim_speech', @@ -105,6 +106,7 @@ Story.actions = { }, action: function () { console.log('fuck yeah!'); + Environment.progress.fs_filledBoard = true; Game.log('Kontaktdaten verloren.'); Game.log('Lieber schnell wieder raus hier!'); // TODO implement board fill diff --git a/registration-system/view/signups/game1/maps/castle_entrance.svg b/registration-system/view/signups/game1/maps/castle_entrance.svg index 743a12298acd28ff16697bc1ce2a8d53f8c621d0..fe44675e8888892d617c61e91927965fa2164151 100644 GIT binary patch delta 492 zcma)&ze)o^5XQMRe})hR5lspsm)KaXx4U<_J&jgklSX|3IbxJU)L=xTtzZyMPz0y2 z5b^|e_W+ibb_x-+P*EbOEp!u&g*FcSSeTF5`Q|&jA3mrLUmyuMOkdxvk#db_evOd& z{v@MZrXqT)yw&Am&MoA}a;1qBH%yb7%;0~-?TM7-P-a+?rSbBROl#7QRLGPTU}<UK zY?UN6jx$vf537He!`r=BP|b0(CC8#GZpmBmcJd2KN4-M&%MVqe=u!j}K}ARr_8+RS zoW;vm=*77w=*P7N1QS9~AxyjDTi08LZEjK95;h(+!01^l&gV<s#(c5hZmp)!ZH5zl z<7)*s=WT3{8Pu|vqe|j=9TNEQ0#T$P2;ub>NPq7JM!K=k4EOxVacn+9W>89MuudXs zZ7YhjLv6<q9A_Iafa@nD>Aye26~X5_=sVqopl`mxt@i7NAt9+WgeAV?{knlU(xQw@ Y8;={1ZCm(<>u6?lX)=--EpDpk6Dr!CJOBUy delta 1137 zcmcgrO=}ZD7-lEN3~3b)_Lji7y;#_t&iC$=L<FTE3f{d*A`*g4Nx-U?96S`U?xo0p zISQTxy)Ag^FYqi`?7@p4Nbwh_ll_RXZS*28yzI<8@B7Tm^FH%<e|hv_`LzKHBE%B) zDItP99D(f-aN-dF`;RVhtQg^;3f(H2e4UN%pmlTe)>`Xc(`AGxOtoM~!23-%P?!lO z88z_^Sa($XeFt22N?Izj9)WXO(8E<*osD*H%eTa24rFO*Xr4#Fb%^=)1T1YQ5wKC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