off event

This commit is contained in:
zhoutianyang 2020-08-21 16:59:28 +08:00
parent 60b0eb5237
commit 204b541035

View File

@ -22,8 +22,8 @@ export default class Scratch_ticket extends cc.Component {
beforeDestroy() {
this.ticketNode.off(cc.Node.EventType.TOUCH_START, this.touchStartEvent, this);
this.ticketNode.off(cc.Node.EventType.TOUCH_MOVE, this.touchMoveEvent, this);
this.ticketNode.on(cc.Node.EventType.TOUCH_END, this.touchEndEvent, this);
this.ticketNode.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEndEvent, this);
this.ticketNode.off(cc.Node.EventType.TOUCH_END, this.touchEndEvent, this);
this.ticketNode.off(cc.Node.EventType.TOUCH_CANCEL, this.touchEndEvent, this);
}
touchStartEvent(event) {