From 4aabd0b8662361137ffc4a4336d30a9e0946f04d Mon Sep 17 00:00:00 2001 From: JianMiau Date: Mon, 2 May 2022 22:29:07 +0800 Subject: [PATCH] =?UTF-8?q?[add]=20HoldButton=20=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E8=B7=9FButton=E4=BA=8B=E4=BB=B6=E8=A1=9D=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/Engine/Component/Button/HoldButton.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/Script/Engine/Component/Button/HoldButton.ts b/assets/Script/Engine/Component/Button/HoldButton.ts index 3b9f7c6..356124a 100644 --- a/assets/Script/Engine/Component/Button/HoldButton.ts +++ b/assets/Script/Engine/Component/Button/HoldButton.ts @@ -44,7 +44,7 @@ export default class HoldButton extends cc.Component { //#region Lifecycle protected start(): void { - this._clickEvents = this.getComponent(cc.Button).clickEvents.slice(0); + this._clickEvents = Array.from(this.getComponent(cc.Button).clickEvents); this.getComponent(cc.Button).clickEvents.Clear(); if (this.HoldLine != null) { this.HoldLine.active = false;