继续补充UI细节
This commit is contained in:
@@ -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, () => {
|
||||
|
||||
Reference in New Issue
Block a user