GameVariables.ts 1.18 KB
import { editorDefaultGlobalVariables, editorDefaultRecordVariables, editorGlobalVariableConstrains, EditorGlobalVariableType, editorRecordVariableConstrains, EditorRecordVariableType } from "./EditorGameVariables";
import { ReadonlyPlot } from "simba-avg-core/dist/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: ""
}