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);