[add] HoldButton 防止跟Button事件衝突

This commit is contained in:
建喵 2022-05-02 22:29:07 +08:00
parent 4a033f606c
commit 4aabd0b866

View File

@ -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;