微信浏览器暂停问题
This commit is contained in:
@@ -13,7 +13,7 @@ export class Candy extends Laya.Script {
|
|||||||
|
|
||||||
public onInit(handler: any, func: any): void {
|
public onInit(handler: any, func: any): void {
|
||||||
this.owner.on(Laya.Event.CLICK, handler, func)
|
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_show = this.owner.getChildByName("offset").getChildByName("label") as Laya.Label
|
||||||
this.label_left = this.owner.getChildByName("offset").getChildByName("label_left") as Laya.Label
|
this.label_left = this.owner.getChildByName("offset").getChildByName("label_left") as Laya.Label
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,6 +152,10 @@ export class Stage extends Laya.Script {
|
|||||||
Laya.stage.on(Laya.Event.FOCUS, this, () => {
|
Laya.stage.on(Laya.Event.FOCUS, this, () => {
|
||||||
Stage.EventUpdatePause(false)
|
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_MISTAKE, Stage.EventUpdateMistake)
|
||||||
EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_PAUSE, Stage.EventUpdatePause)
|
EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_PAUSE, Stage.EventUpdatePause)
|
||||||
|
|||||||
Reference in New Issue
Block a user