完善hint功能

This commit is contained in:
2025-05-16 15:52:18 +08:00
parent 67c2201eaf
commit ed7f125c43
6 changed files with 76 additions and 34 deletions

View File

@@ -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> {

View File

@@ -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)
}
}