修复追逐战bug?

This commit is contained in:
AncTe committed 2023-04-26 21:40:56 +08:00
1 parent 34154e77c1
commit a5854a8bb4
4 files changed
+27 -13

No files matched your search

+6 -2
View File
@@ -136,7 +136,10 @@ export class Chase {
) {
const func = () => {
if (!flags.chaseTime?.[floorId]) return;
if (Date.now() - (flags.chaseTime?.[floorId] ?? 0) >= time) {
if (
Date.now() - (flags.chaseTime?.[floorId] ?? Date.now()) >=
time
) {
fn(this);
this.ani.ticker.remove(func);
}
@@ -242,10 +245,11 @@ export async function startChase(index: number) {
flags.chaseHard === 0
);
flags.chase = chase;
const hard = flags.chaseHard;
// 成就
chase.onEnd(() => {
if (flags.chaseHard === 1) {
if (hard === 1) {
if (index === 1) {
completeAchievement('challenge', 0);
}
-3
View File
@@ -581,9 +581,6 @@ export function para3(chase: Chase) {
core.showStatusBar();
ani.time(750).apply('rect', 0);
chase.end();
if (!chase.showPath) {
completeAchievement('challenge', 0);
}
await sleep(750);
ani.ticker.destroy();
core.deleteCanvas('chaseBack');