Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/webgal/src/Core/gameScripts/wait.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ISentence } from '@/Core/controller/scene/sceneInterface';
import { IPerform } from '@/Core/Modules/perform/performInterface';
import { getBooleanArgByKey } from '@/Core/util/getSentenceArg';

/**
* 等待 n 毫秒
Expand All @@ -8,14 +9,18 @@ import { IPerform } from '@/Core/Modules/perform/performInterface';
export const wait = (sentence: ISentence): IPerform => {
const duration = Number(sentence.content);
const performName = `wait${Math.random().toString()}`;
const nobreak = getBooleanArgByKey(sentence, 'nobreak') ?? false;

return {
performName,
duration: duration,
goNextWhenOver: true,
isHoldOn: false,
stopFunction: () => {},
blockingNext: () => false,
blockingAuto: () => true,
stopFunction: () => {
// 无需状态清理
},
blockingNext: () => nobreak,
blockingAuto: () => nobreak,
stopTimeout: undefined, // 暂时不用,后面会交给自动清除
};
};
Loading