|
@@ -22,13 +22,12 @@ cc.Class({
|
|
|
this.calcDir();
|
|
this.calcDir();
|
|
|
},
|
|
},
|
|
|
update(dt) {
|
|
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() {
|
|
calcDir: function() {
|
|
|
let dirvecX = this.touchEndPoint.x - this.touchStartPoint.x;
|
|
let dirvecX = this.touchEndPoint.x - this.touchStartPoint.x;
|