Sfoglia il codice sorgente

更新 'games/yqrxd/launcher/game-min.js'

yunhaipiaodi 6 anni fa
parent
commit
d1c3c48a01
1 ha cambiato i file con 16 aggiunte e 15 eliminazioni
  1. 16 15
      games/yqrxd/launcher/game-min.js

+ 16 - 15
games/yqrxd/launcher/game-min.js

@@ -3633,20 +3633,21 @@ var __extends = this.__extends || function(c, d) {
             null != this.ingame && (this.removeChild(this.ingame), this.ingame = null);
             null == this.info && (this.info = new Info, this.addChild(this.info))
         };
-      	
-      	//添加左右键盘按键操作
-        document.onkeydown = function (event) {
-            var e = event || window.event || arguments.callee.caller.arguments[0];
-
-            if(e && e.keyCode == 39){       //右方向键
-                this.ingame.clickBtnNum = 1;
-            }
-
-            if(e && e.keyCode == 37){       //左方向键
-                this.ingame.clickBtnNum = 0;
-            }
-            this.ingame.checkValue();
-        };
+      
         return d
     }(egret.DisplayObjectContainer);
-MainGame.prototype.__class__ = "MainGame";
+MainGame.prototype.__class__ = "MainGame";
+
+//添加左右键盘按键操作
+document.onkeydown = function (event) {
+    var e = event || window.event || arguments.callee.caller.arguments[0];
+
+    if(e && e.keyCode == 39){       //右方向键
+        MainGame.prototype.ingame.clickBtnNum = 1;
+    }
+
+    if(e && e.keyCode == 37){       //左方向键
+        MainGame.prototype.ingame.clickBtnNum = 0;
+    }
+    MainGame.prototype.ingame.checkValue();
+};