diff --git a/.idea/door.iml b/.idea/door.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/door.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..687d6c5 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..b01a423 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + Angular + + + + + + + + + + + + + + + + + + + + + 在这里写下你想说的话 + - then just copy & send this link to your lover(s): + 复制下面的链接,分享给你的TA吧! - or, if you wanna send your message out to everyone: + 或者, 分享一下?
-
-
-
-
-
-
+ +
+
+
+ + + + +
- and lastly, if you wanna show this + 在最后,如果你想
- minigame's creator some love, you can + 对这个小游戏的制作者表示一些心意,那就
-
support me on patreon
+
在patreon支持一下我吧
- so I can keep making free + 正是大家的支持,让我能做的更好、并让它能够继续免费
open-source playable silliness.
@@ -93,7 +94,7 @@
- thanks for playing! <3 + 谢谢你们玩我的游戏 diff --git a/js/Key.js b/js/Key.js index ea56c84..b41c486 100644 --- a/js/Key.js +++ b/js/Key.js @@ -15,15 +15,18 @@ // Event Handling var onKeyDown = function(event){ - var code = KEY_CODES[event.keyCode]; + var code = KEY_CODES[event.which]; Key[code] = true; if(window.STAGE==4) return; - event.stopPropagation(); + console.log(code); + + event.stopPropagation(); event.preventDefault(); } var onKeyUp = function(event){ - var code = KEY_CODES[event.keyCode]; + var code = KEY_CODES[event.which]; Key[code] = false; + console.log(code); if(window.STAGE==4) return; event.stopPropagation(); event.preventDefault(); diff --git a/js/game.js b/js/game.js index cb0423b..da8926a 100644 --- a/js/game.js +++ b/js/game.js @@ -20,6 +20,7 @@ function addAsset(name,src){ images[name].src = src; } function addSound(name,src){ + assetsLeft++; createjs.Sound.addEventListener("fileload", onAssetLoaded); createjs.Sound.registerSound({src:src, id:name}); @@ -743,7 +744,7 @@ function iHeartYou(){ if(window.location.hash){ vtext.textContent = encryptString(decodeURIComponent(window.location.hash).substring(1)); }else{ - vtext.textContent = "a lovely message from me to you <3"; + vtext.textContent = "我想对你说: 我爱你!"; } setTimeout(function(){ @@ -789,6 +790,7 @@ function reset(){ // Simple XOR encryption (key = 1) // The only purpose is to obscure it in the hash +// function encryptString(string){ var result = ""; @@ -805,32 +807,33 @@ var yourMessage = document.getElementById("your_message"); var yourLink = document.getElementById("your_link"); function linkChangey(){ if(yourMessage.value==""){ - yourLink.value = "http://ncase.me/door/"; + yourLink.value = "http://door.intyut.cn/"; }else{ - yourLink.value = "http://ncase.me/door/#"+encodeURIComponent(encryptString(yourMessage.value)); + yourLink.value = "http://door.intyut.cn/#"+encodeURIComponent(encryptString(yourMessage.value)); + } }; yourMessage.onchange = linkChangey; yourMessage.oninput = linkChangey; +// 获取一下 linkChangey(); yourLink.onclick = function(){ yourLink.select(); }; function socialShare(event,type){ - - var link = yourLink.value; - var title = "it's a(door)able"; +var link = yourLink.value; + var title = "神奇的门"; var url = ""; var width = 640; var height = 480; switch(type){ - case "facebook": - url += "https://www.facebook.com/sharer.php?u="+encodeURIComponent(link); - url += "&t="+encodeURIComponent("A lovely message for all my dear friends. This minigame only takes a minute to play, check it out! it's a(door)able --"); - width = 626; - height = 436; + case "qqzone": + var url = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?'; + url += 'url=' + encodeURIComponent(link||document.location); //参数url设置分享的内容链接|默认当前页location + url += '&showcount=' + 0||0; //参数showcount是否显示分享总数,显示:'1',不显示:'0',默认不显示 + url += '&desc=' + encodeURIComponent('神奇的门,一个一分钟小游戏!快来玩耍一下把'); //参数desc设置分享的描述,可选参数 break; case "twitter": url += "https://twitter.com/share?url="+encodeURIComponent(link);