mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-01 07:24:30 +08:00
修复追逐战bug?
This commit is contained in:
1 parent
34154e77c1
commit
a5854a8bb4
4 files changed
+27
-13
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user