From ae2229927fc4fbee5920d20074f48e37217bfbaa Mon Sep 17 00:00:00 2001 From: yangwen Date: Fri, 30 May 2025 18:55:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B0=E5=AD=97=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Block.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/views/Block.ts b/src/views/Block.ts index 6869363..b2b1352 100644 --- a/src/views/Block.ts +++ b/src/views/Block.ts @@ -66,13 +66,19 @@ export class Block extends Laya.Script { this.sprite_show.graphics.drawRect(0, 0, this.blockSize, this.blockSize, color) if (animated) { this.sprite_show.alpha = 0 - Laya.Tween.to(this.sprite_show, { alpha }, 200, Laya.Ease.linearIn) - Laya.Tween.to(this.sprite_show, { alpha: 0 }, 300, Laya.Ease.linearIn, null, 200) - Laya.Tween.to(this.sprite_show, { alpha }, 100, Laya.Ease.linearIn, Laya.Handler.create(this, () => { - this.sprite_show.graphics.clear() - this.sprite_show.graphics.drawRect(0, 0, this.blockSize, this.blockSize, completedColor) - this.sprite_show.alpha = completedAlpha - }), 500) + Laya.Tween.to(this.sprite_show, { alpha }, 200, Laya.Ease.linearIn, Laya.Handler.create(this, () => { + Laya.Tween.to(this.sprite_show, { alpha: 0 }, 300, Laya.Ease.linearIn, Laya.Handler.create(this, () => { + Laya.Tween.to(this.sprite_show, { alpha }, 200, Laya.Ease.linearIn, Laya.Handler.create(this, () => { + Laya.Tween.to(this.sprite_show, { alpha }, 200, Laya.Ease.linearIn, Laya.Handler.create(this, () => { + this.sprite_show.graphics.clear() + this.sprite_show.graphics.drawRect(0, 0, this.blockSize, this.blockSize, completedColor) + this.sprite_show.alpha = completedAlpha + })) + })) + })) + })) + // Laya.Handler.create(this, () => { + // }) } else { this.sprite_show.alpha = alpha }