完善hint功能
This commit is contained in:
@@ -128,6 +128,14 @@ export class DOStage {
|
||||
this.data.note_open = note_open
|
||||
StorageManager.getInstance().onChanged()
|
||||
}
|
||||
|
||||
public get_hint(): number {
|
||||
return this.data.hint
|
||||
}
|
||||
public set_hint(hint: number): void {//提示
|
||||
this.data.hint = hint
|
||||
StorageManager.getInstance().onChanged()
|
||||
}
|
||||
//====================================持久化数据
|
||||
|
||||
public get_blocks(): Array<DOBlock> {
|
||||
|
||||
@@ -35,7 +35,7 @@ export class StorageManager {
|
||||
this.stageMap.set(stageID, dataStage)
|
||||
}
|
||||
else {
|
||||
dataStage = {mistake: 0, difficulty: config.DIFFICULTY_TYPE.Easy, duration: 0, note_open: false, blocks: new Array(), candys: new Array()}
|
||||
dataStage = {mistake: 0, difficulty: config.DIFFICULTY_TYPE.Easy, duration: 0, note_open: false, hint: 2, blocks: new Array(), candys: new Array()}
|
||||
this.stageMap.set(stageID, dataStage)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user