From aa98af09b2bb7aad9354aa805d304d8d67a3105f Mon Sep 17 00:00:00 2001 From: yangwen Date: Wed, 4 Jun 2025 16:50:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E6=9A=82=E5=81=9C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Candy.ts | 2 +- src/views/Stage.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Candy.ts b/src/views/Candy.ts index 451e13f..47b54d7 100644 --- a/src/views/Candy.ts +++ b/src/views/Candy.ts @@ -13,7 +13,7 @@ export class Candy extends Laya.Script { public onInit(handler: any, func: any): void { this.owner.on(Laya.Event.CLICK, handler, func) - this.show_sprite = this.owner.getChildByName("offset").getChildByName("Sprite") as Laya.Sprite + this.show_sprite = this.owner.getChildByName("offset").getChildByName("Image") as Laya.Image this.label_show = this.owner.getChildByName("offset").getChildByName("label") as Laya.Label this.label_left = this.owner.getChildByName("offset").getChildByName("label_left") as Laya.Label } diff --git a/src/views/Stage.ts b/src/views/Stage.ts index f2011ca..8b5ea63 100644 --- a/src/views/Stage.ts +++ b/src/views/Stage.ts @@ -152,6 +152,10 @@ export class Stage extends Laya.Script { Laya.stage.on(Laya.Event.FOCUS, this, () => { Stage.EventUpdatePause(false) }) + // Laya.stage.on(Laya.Event.FOCUS_CHANGE, this, (evt: Laya.Event) => { + // console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>FOCUS_CHANGE", evt, Laya.stage.isFocused) + // Stage.EventUpdatePause(!Laya.stage.isFocused) + // }) EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_MISTAKE, Stage.EventUpdateMistake) EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_PAUSE, Stage.EventUpdatePause)