소스 검색

修复文档的bug

FantasyUFG 4 년 전
부모
커밋
629eb0b039
1개의 변경된 파일6개의 추가작업 그리고 7개의 파일을 삭제
  1. 6 7
      assets/script/Game/Touch.js

+ 6 - 7
assets/script/Game/Touch.js

@@ -22,13 +22,12 @@ cc.Class({
         this.calcDir();
     },
     update(dt) {
-        this.scheduleOnce(function() {
-            if (this.GameMode._gamestart) {
-                this.node.on(cc.Node.EventType.TOUCH_START, this.ontouch_start, this);
-                this.node.on(cc.Node.EventType.TOUCH_END, this.ontouch_End, this);
-
-            }
-        }, 4);
+        // this.scheduleOnce(function() {
+        if (this.GameMode._gamestart) {
+            this.node.on(cc.Node.EventType.TOUCH_START, this.ontouch_start, this);
+            this.node.on(cc.Node.EventType.TOUCH_END, this.ontouch_End, this);
+        }
+        // }, 4);
     },
     calcDir: function() {
         let dirvecX = this.touchEndPoint.x - this.touchStartPoint.x;