-
-
Notifications
You must be signed in to change notification settings - Fork 339
Expand file tree
/
Copy pathcallSceneScript.ts
More file actions
22 lines (21 loc) · 806 Bytes
/
callSceneScript.ts
File metadata and controls
22 lines (21 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { ISentence } from '@/Core/controller/scene/sceneInterface';
import { IPerform } from '@/Core/Modules/perform/performInterface';
import { callScene } from '../controller/scene/callScene';
/**
* 调用一个场景,在场景结束后回到调用这个场景的父场景。
* @param sentence
*/
export const callSceneScript = (sentence: ISentence): IPerform => {
const sceneNameArray: Array<string> = sentence.content.split('/');
const sceneName = sceneNameArray[sceneNameArray.length - 1];
callScene(sentence.content, sceneName, sentence.args);
return {
performName: 'none',
duration: 0,
isHoldOn: true,
stopFunction: () => {},
blockingNext: () => false,
blockingAuto: () => true,
stopTimeout: undefined, // 暂时不用,后面会交给自动清除
};
};