添加按钮动画

This commit is contained in:
2025-05-28 16:54:04 +08:00
parent ce6e6a91d1
commit 6e850ff6a9
3 changed files with 128 additions and 54 deletions

View File

@@ -506,6 +506,9 @@ export class Stage extends Laya.Script {
public onClickCandy(evt: Laya.Event): void {
var candy = evt.target.getComponent(Candy);
this.onApplyCandy(candy.get_show(), false)
var sp = evt.target.getChildByName("Sprite") as Laya.Sprite
Laya.Tween.to(sp, {scaleX: 0.9, scaleY: 0.9}, 100, Laya.Ease.linearIn)
Laya.Tween.to(sp, {scaleX: 1, scaleY: 1}, 100, Laya.Ease.linearInOut, null, 100)
}
onKeyUp(evt: Laya.Event): void {