update framework

This commit is contained in:
Vick Scarlet
2021-11-07 22:17:04 +08:00
parent f40698d63e
commit 22fa5d755a
197 changed files with 91751 additions and 3232 deletions
+22
View File
@@ -0,0 +1,22 @@
class ScaleButton extends Laya.Button {
constructor() {
super();
this.on(Laya.Event.MOUSE_DOWN, this, this.onMouse, [Laya.Event.MOUSE_DOWN]);
this.on(Laya.Event.MOUSE_OUT, this, this.onMouse, [Laya.Event.MOUSE_OUT]);
this.on(Laya.Event.MOUSE_UP, this, this.onMouse, [Laya.Event.MOUSE_UP]);
}
onMouse(type) {
switch (type) {
case Laya.Event.MOUSE_DOWN:
Laya.Tween.to(this, { scaleX: 0.9, scaleY: 0.9 }, 100);
break;
case Laya.Event.MOUSE_OUT:
case Laya.Event.MOUSE_UP:
Laya.Tween.to(this, { scaleX: 1, scaleY: 1 }, 100);
break;
default:
break;
}
}
}