完善关卡逻辑
This commit is contained in:
@@ -18,8 +18,10 @@ export interface DataUndo {
|
||||
//关卡数据
|
||||
export interface DataStage {
|
||||
id: string,
|
||||
type: number,
|
||||
name: string,
|
||||
difficulty: number,
|
||||
difficulty: string,
|
||||
index: number,
|
||||
mistake?: number,
|
||||
duration?: number,
|
||||
note_open?: boolean,
|
||||
@@ -28,8 +30,8 @@ export interface DataStage {
|
||||
blocks?: Array<DataBlock>,
|
||||
undos?: Array<DataUndo>,
|
||||
}
|
||||
export function createDataStage(id: string, name: string, difficulty: number): DataStage {
|
||||
var data: DataStage = {id: id, name: name, difficulty: difficulty}
|
||||
export function createDataStage(id: string, type: number, name: string, difficulty: string, index: number): DataStage {
|
||||
var data: DataStage = {id: id, type: type, name: name, difficulty: difficulty, index: index}
|
||||
data.mistake = 0
|
||||
data.duration = 0
|
||||
data.note_open = false
|
||||
@@ -38,4 +40,15 @@ export function createDataStage(id: string, name: string, difficulty: number): D
|
||||
data.blocks = new Array()
|
||||
data.undos = new Array()
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
export interface DataProgress {
|
||||
difficulty: string,
|
||||
index: number,
|
||||
}
|
||||
export interface DataUser {
|
||||
isCompletedMain: boolean,//当前主线是否已完成 默认true
|
||||
dones: Array<string>,//已完成关卡
|
||||
progresses: Array<DataProgress>,//已经完成的进度
|
||||
}
|
||||
Reference in New Issue
Block a user