add trophy logic
This commit is contained in:
@@ -107,7 +107,7 @@ export class DOStage {
|
||||
}
|
||||
public set_mistake(mistake: number): void {
|
||||
this.data.mistake = mistake
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
|
||||
public get_score(): number {
|
||||
@@ -115,7 +115,7 @@ export class DOStage {
|
||||
}
|
||||
public set_score(score: number): void {
|
||||
this.data.score = score
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
|
||||
public get_duration(): number {
|
||||
@@ -123,7 +123,7 @@ export class DOStage {
|
||||
}
|
||||
public set_duration(duration: number): void {//关卡计时
|
||||
this.data.duration = duration
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
|
||||
public get_note_open(): boolean {
|
||||
@@ -131,7 +131,7 @@ export class DOStage {
|
||||
}
|
||||
public set_note_open(note_open: boolean): void {
|
||||
this.data.note_open = note_open
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
|
||||
public get_select_index(): number {
|
||||
@@ -139,7 +139,7 @@ export class DOStage {
|
||||
}
|
||||
public set_select_index(select_index: number): void {//当前选中
|
||||
this.data.select_index = select_index
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
|
||||
public get_hint(): number {
|
||||
@@ -147,7 +147,7 @@ export class DOStage {
|
||||
}
|
||||
public set_hint(hint: number): void {//提示
|
||||
this.data.hint = hint
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
|
||||
public get_undos(): Array<DataUndo> {
|
||||
@@ -163,14 +163,14 @@ export class DOStage {
|
||||
var dataUndo: DataUndo = {index: index, show: show, notes: _notes}
|
||||
console.log("add_undo >>>>>>>>>>>>>>>>>>>>>>>>>>>>", JSON.stringify(dataUndo))
|
||||
this.data.undos.push(dataUndo)
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
public pop_undo(): DataUndo {
|
||||
var dataUndo: DataUndo
|
||||
if (this.data.undos.length > 0) {
|
||||
dataUndo = this.data.undos[this.data.undos.length-1]
|
||||
this.data.undos.splice(this.data.undos.length-1, 1)
|
||||
StorageManager.getInstance().onChanged()
|
||||
StorageManager.getInstance().onStageChanged()
|
||||
}
|
||||
return dataUndo
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user