继续补充UI细节

This commit is contained in:
2025-06-04 18:06:27 +08:00
parent 28107a24f9
commit d352331151
4 changed files with 459 additions and 447 deletions

View File

@@ -12,12 +12,13 @@ export class Difficulty extends Laya.Script {
// 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次
onAwake(): void {
const offset = this.owner.getChildByName("offset") as Laya.Box
const offset = this.owner.getChildByName("bottom").getChildByName("offset") as Laya.Box
const bg = offset.getChildByName("bg") as Laya.Sprite
bg.graphics.clear()
bg.graphics.drawRoundRect(0, 0, offset.width, offset.height, 20, 20, 0, 0, "#f5f7fb")
Laya.Tween.to(offset, { y: 705 }, 500)
offset.y = offset.width
Laya.Tween.to(offset, { y: 0 }, 500)
const mask = this.owner.getChildByName("mask")
mask.on(Laya.Event.CLICK, this, () => {