From 409ec35c23e264c5e68275e2793f13557d8d34b8 Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Mon, 21 Aug 2017 21:19:21 +0200 Subject: [PATCH] ASD --- build.sh | 2 +- src/muri.min.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/muri.min.js diff --git a/build.sh b/build.sh index a433617..a942c2b 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ rm -f muri-src.zip muri.zip src/muri.min.js uglifyjs --compress --mangle --no-dead-code --output src/muri.min.js src/*.js (cd src && zip -q -9 ../muri.zip index.html muri.min.js assets/* assets/**/* vendor/*.min.js) -(cd src && zip -q -9 ../muri-src.zip *) +(cd src && zip -q -9 ../muri-src.zip ./* ./**/* ./**/**/* ../README) filesize=`stat --printf="%s" muri.zip` echo $filesize "byte ->" $((100*$filesize/13000)) "%" diff --git a/src/muri.min.js b/src/muri.min.js new file mode 100644 index 0000000..ab3b5f3 --- /dev/null +++ b/src/muri.min.js @@ -0,0 +1 @@ +"use strict";var muri=function(){kontra.init("js13k-2017"),kontra.assets.imagePath="assets/images";var t={},r=function(t){return kontra.sprite({x:0,y:0,image:kontra.assets.images["room_"+t]})};return t.modules=[],t.start=function(){kontra.assets.load("player.png","room_stasis_dark.png","room_stasis.png").then(function(){document.getElementById("loading").style.display="none",null===kontra.store.get("current-room")&&kontra.store.set("current-room","stasis_dark");var s={stasis_dark:r("stasis_dark"),stasis:r("stasis")};kontra.gameLoop({update:function(){var r=kontra.store.get("current-room");s[r].update();for(m in t.modules)m.update()},render:function(){var r=kontra.store.get("current-room");s[r].render();for(m in t.modules)m.render()}}).start()})},t}();window.onload=muri.start; \ No newline at end of file