From 4b8cb729e2abb191814ede14308b3a477e8880b6 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Tue, 8 Oct 2024 22:24:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=BD=E9=80=90=E6=88=98=E5=9B=B0?= =?UTF-8?q?=E9=9A=BE=E9=9A=BE=E5=BA=A6=E6=88=90=E5=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin/chase/chase.ts | 1 - src/plugin/chase/chase1.ts | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugin/chase/chase.ts b/src/plugin/chase/chase.ts index c57b62a..e126302 100644 --- a/src/plugin/chase/chase.ts +++ b/src/plugin/chase/chase.ts @@ -1,4 +1,3 @@ -import { logger } from '@/core/common/logger'; import { MotaOffscreenCanvas2D } from '@/core/fx/canvas2d'; import { CameraAnimation } from '@/core/render/camera'; import { LayerGroup } from '@/core/render/preset/layer'; diff --git a/src/plugin/chase/chase1.ts b/src/plugin/chase/chase1.ts index c61a5ed..bbacac4 100644 --- a/src/plugin/chase/chase1.ts +++ b/src/plugin/chase/chase1.ts @@ -5,7 +5,6 @@ import { Camera, CameraAnimation, CameraScale } from '@/core/render/camera'; import { LayerGroup } from '@/core/render/preset/layer'; import { MotaRenderer } from '@/core/render/render'; import { Sprite } from '@/core/render/sprite'; -import { AudioPlayer } from '@/core/audio/audio'; import { bgm } from '@/core/audio/bgm'; const path: Partial> = { @@ -177,7 +176,7 @@ export function initChase(): IChaseController { animation14.translate(translate, 36, 0, 3320, 21580, linear()); animation14.translate(translate, 0, 0, 9960, 24900, linear()); - chase.on('end', () => { + chase.on('end', success => { camera.transform.reset(); camera.transform.translate( -translate.x * 32 - 7 * 32, @@ -191,6 +190,10 @@ export function initChase(): IChaseController { back = void 0; core.removeFlag('onChase'); core.removeFlag('chaseId'); + + if (success) { + completeAchievement('challenge', 0); + } }); judgeFail1(chase, ani, camera);