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)