cc.Class({ extends: cc.Component, properties: { LeavingPrintLocatoinLine: { default: null, type: cc.Prefab }, }, onLoad: function () { this.spawnLine = this.node.getComponent('SpawnLine'); this.touchClick(); }, touchClick: function () { var self = this; self.node.on(cc.Node.EventType.TOUCH_START, function (event) { this.TOUCH_START(true); }.bind(this), self.node); self.node.on(cc.Node.EventType.TOUCH_MOVE, function (event) { }.bind(this), self.node); self.node.on(cc.Node.EventType.TOUCH_END, function (event) { this.TOUCH_END(true); }.bind(this), self.node); }, TOUCH_START: function () { if(!GlobalData.game.isCanTouch)return; GlobalData.game.isItAlwaysTouch = true; if (GlobalData.game.playerCurrentZone == 1) { GlobalData.gameMode.StartTouchLongAcceleration(); } else { this.spawnLine.spawnBlackLine(); } }, TOUCH_END: function () { if(!GlobalData.game.isCanTouch)return; GlobalData.game.isItAlwaysTouch = false; if (GlobalData.game.playerCurrentZone == 1) { GlobalData.gameMode.StopTouchLongAcceleration(); } }, });