优化home加载

This commit is contained in:
2025-06-03 19:47:45 +08:00
parent ce90518d06
commit 483df4cf34
3 changed files with 18 additions and 12 deletions

View File

@@ -16,8 +16,6 @@ export class Main extends Laya.Script {
const resources: Array<{ url: string, type?: any, lazy?: boolean }> = [
{ url: respath.score_add_ui_res()},
{ url: respath.home_top_dc_bg_normal, type: Laya.Loader.IMAGE },
{ url: respath.home_top_dc_bg_finish, type: Laya.Loader.IMAGE },
{ url: respath.dc_top_bg_normal, type: Laya.Loader.IMAGE },
{ url: respath.dc_top_bg_month_finish, type: Laya.Loader.IMAGE },
{ url: respath.trophy_bg_light_gold, type: Laya.Loader.IMAGE },

View File

@@ -150,6 +150,7 @@ export class TopBar extends Laya.Script {
}
onOver(evt: Laya.Event): void {
Laya.Render.canvas.style.cursor = "pointer"
const Box = evt.target as Laya.Box
const sprite = Box.getChildByName("Sprite") as Laya.Sprite
sprite.graphics.clear()
@@ -157,6 +158,7 @@ export class TopBar extends Laya.Script {
}
onOut(evt: Laya.Event): void {
Laya.Render.canvas.style.cursor = ""
const Box = evt.target as Laya.Box
const sprite = Box.getChildByName("Sprite") as Laya.Sprite
sprite.graphics.clear()