From 204b5410359489a35fbc8b4bd1f171b70779844b Mon Sep 17 00:00:00 2001 From: zhoutianyang Date: Fri, 21 Aug 2020 16:59:28 +0800 Subject: [PATCH] off event --- assets/Scene/Scratch_ticket/Scratch_ticket.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/Scene/Scratch_ticket/Scratch_ticket.ts b/assets/Scene/Scratch_ticket/Scratch_ticket.ts index 72207ed..76cf64f 100644 --- a/assets/Scene/Scratch_ticket/Scratch_ticket.ts +++ b/assets/Scene/Scratch_ticket/Scratch_ticket.ts @@ -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) {