GameVariables.ts
1.16 KB
import { editorDefaultGlobalVariables, editorDefaultRecordVariables, editorGlobalVariableConstrains, EditorGlobalVariableType, editorRecordVariableConstrains, EditorRecordVariableType } from "./EditorGameVariables";
import { ReadonlyPlot } from "../model/PlotModel";
export interface GlobalVariableType extends EditorGlobalVariableType {
/**存回档后不变的数据 */
customPlots: { [key: string]: ReadonlyPlot };
customPlotId: number;
plotUseEnergy: number;
}
export interface RecordVariableType extends EditorRecordVariableType {
/**存跟着回档变化的数据 */
bgm: string // 当前游戏音乐
}
export const globalVariableConstrains: { [key: string]: { min?: number, max?: number } } = {
...editorGlobalVariableConstrains
}
export const recordVariableConstrains: { [key: string]: { min?: number, max?: number } } = {
...editorRecordVariableConstrains
}
export const defaultGlobalVariables: GlobalVariableType = {
customPlots: {},
customPlotId: -100,
plotUseEnergy: -1,
...editorDefaultGlobalVariables
}
export const defaultRecordVariables: RecordVariableType = {
...editorDefaultRecordVariables,
bgm: ""
}