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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1539585992588
+
+
+ 1539585992588
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 2e443db..5b874ff 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,9 @@ All code and art dedicated to the public domain.
If you'd like to help me keep making free, open-source playable silliness,
please check out [my Patreon!](http://patreon.com/ncase) Thank you. <3
+** 由 liuyinxin 翻译
+[my github](https://github.com/SuperLiuYinXin)
+
---
**Asset Credits:**
@@ -19,3 +22,4 @@ please check out [my Patreon!](http://patreon.com/ncase) Thank you. <3
* SFX Rewind: http://freesound.org/people/kasa90/sounds/174363/ (CC ZERO)
* SFX Unlock: http://freesound.org/people/keweldog/sounds/181140/ (CC ZERO)
* Social Media Icons: http://customizr.net/icons/
+
diff --git a/assets/thumbnail.png b/assets/thumbnail.png
new file mode 100644
index 0000000..d50b55e
Binary files /dev/null and b/assets/thumbnail.png differ
diff --git a/css/index.css b/css/index.css
index 1a5ce46..c991260 100644
--- a/css/index.css
+++ b/css/index.css
@@ -168,6 +168,14 @@ input#your_link{
#share_facebook{
background: url(../icons/facebook.png);
}
+#share_qqzone{
+
+ width: 100%;
+ height: 100%;
+ background: url(../icons/qqzone.png) center no-repeat;
+ -webkit-background-size: 100%;
+ background-size: 100%;
+}
#share_twitter{
background: url(../icons/twitter.png);
}
diff --git a/css/intro.png b/css/intro.png
index 23a25ce..1bfe4c0 100644
Binary files a/css/intro.png and b/css/intro.png differ
diff --git a/icons/qqzone.png b/icons/qqzone.png
new file mode 100644
index 0000000..cb40b5d
Binary files /dev/null and b/icons/qqzone.png differ
diff --git a/index.html b/index.html
index c74df05..6ce1fd5 100644
--- a/index.html
+++ b/index.html
@@ -1,32 +1,30 @@
-
+
-
- it's a(door)able
-
+ 神奇的门! | it's a(door)able
+
+
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
+
@@ -43,8 +41,8 @@
-
rewinding...
-
playing back...
+
回溯中...
+
哒哒~
@@ -53,38 +51,41 @@
-
P.S: you can add your own personal message!
-
+
在这里写下你想说的话
+
-
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);