通用hover效果

This commit is contained in:
2025-05-30 11:52:25 +08:00
parent 6d4bb79a45
commit 23a2f686cb
12 changed files with 395 additions and 122 deletions

View File

@@ -24,15 +24,28 @@ export class UIManager extends Laya.Script {
return UIManager._instance
}
@property(Boolean)
public debug: boolean = false
@property(Laya.Image)
public mask: Laya.Image
@property(Laya.Box)
public btn_clean: Laya.Box
onAwake(): void {
UIManager._instance = this
config.DEBUG = this.debug
this.mask.on(Laya.Event.CLICK, this, () => {
console.log("on click mask >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
})
this.mask.visible = false
this.btn_clean.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
console.log("btn_clean=", evt)
StorageManager.getInstance().cleanAll()
})
this.btn_clean.visible = this.debug
}
private UIRoot: Laya.Panel