Commit 3b80e4df authored by yu's avatar yu

1

parent e8f289d4
...@@ -141,7 +141,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -141,7 +141,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// let player = { right: Game.getIns().player.score, error: Game.getIns().player.error } // let player = { right: Game.getIns().player.score, error: Game.getIns().player.error }
let data: any = {}; let data: any = {};
data.total = Game.getIns().player.score; data.total = Game.getIns().getTotla;
data.right = Game.getIns().player.right; data.right = Game.getIns().player.right;
data.scores = Game.getIns().player.voices; data.scores = Game.getIns().player.voices;
onHomeworkFinish(data) onHomeworkFinish(data)
...@@ -174,7 +174,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -174,7 +174,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
list = JSON.parse(JSON.stringify(list)); list = JSON.parse(JSON.stringify(list));
list.sort((A, B) => { return Math.random() < 0.5 }); list.sort((A, B) => { return Math.random() < 0.5 });
this.list = list; this.list = list;
Game.getIns().player.addScore(this.list.length); // Game.getIns().player.addScore(this.list.length);
this.count = 0; this.count = 0;
this.lastCount = null; this.lastCount = null;
this.fishs = []; this.fishs = [];
......
...@@ -182,6 +182,9 @@ export default class Game { ...@@ -182,6 +182,9 @@ export default class Game {
addPage() { addPage() {
this.page += 1; this.page += 1;
} }
get getTotla() {
return this.data.length;
}
get isOver() { get isOver() {
return this.page > this.lists.length; return this.page > this.lists.length;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment