14 lines
505 B
TypeScript
14 lines
505 B
TypeScript
|
|
const { regClass, property } = Laya;
|
||
|
|
|
||
|
|
@regClass()
|
||
|
|
export class ScoreAdd extends Laya.Script {
|
||
|
|
declare owner : Laya.Box;
|
||
|
|
|
||
|
|
//组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次
|
||
|
|
onAwake(): void {
|
||
|
|
var offset = this.owner.getChildByName("offset")
|
||
|
|
Laya.Tween.to(offset, {y:-200}, 1000, Laya.Ease.strongIn, null, 500)
|
||
|
|
var Label = offset.getChildByName("Label")
|
||
|
|
Laya.Tween.to(Label, {scaleX:1.5, scaleY:1.5}, 500)
|
||
|
|
}
|
||
|
|
}
|