Commit baa47a6f authored by yu's avatar yu

7.8修改

parent 7076bf96
This diff is collapsed.
......@@ -87,29 +87,28 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showGame();
}
private touchOver() {
onHomeworkFinish();
this.playLocalAudio("finish"); let data: any = {};
let questions = this.logs.concat();
let score = 0;
questions.forEach(q => {
score += q.score;
})
data.questions = questions;
data.score = score;
console.log(data);
onHomeworkFinish(data);
}
private gameOver() {
setTimeout(() => {
this.playLocalAudio("finish");
let btn_check = cc.find("btn_check", this.node);
btn_check.getComponent(cc.Button).interactable = true;
// let mouse_end = pg.view.find(this, "mouse_end");
// mouse_end.active = true;
// mouse_end.getComponent("mrbr04_mouse_end").play().then(() => {
//结算
let data: any = {};
let questions = this.logs.concat();
let score = 0;
questions.forEach(q => {
score += q.score;
})
data.questions = questions;
data.score = score;
console.log(data);
onHomeworkFinish();
// })
}, 1800);
}, 1);
}
private showGame() {
if (this.roundIdx >= this.data.questions.length) {
......@@ -185,7 +184,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// let isText = this.upArr[0].type == 1;
let isText = type == "txt";
if (this.upArr.length == 5) {
item = isText ? cc.instantiate(this.item5_left) : cc.instantiate(this.item5_pic);
item = isText ? cc.instantiate(this.item5_right) : cc.instantiate(this.item5_pic);
}
else if (this.upArr.length == 4) {
item = isText ? cc.instantiate(this.item4_text) : cc.instantiate(this.item4_pic);
......@@ -218,9 +217,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
private getlayoutSpacing() {
if (this.upArr.length == 2) return { sY: 100, top: 100 };
if (this.upArr.length == 3) return { sY: 20, top: 20 };
if (this.upArr.length == 4) return { sY: 15, top: 15 };
if (this.upArr.length == 5) return { sY: 0, top: 7 };
if (this.upArr.length == 3) return { sY: 0, top: 40 };
if (this.upArr.length == 4) return { sY: 0, top: 40 };
if (this.upArr.length == 5) return { sY: -9, top: 30 };
}
private showLayout() {
......
assets/BOY04/textures/word/check_1.png

6.84 KB | W: | H:

assets/BOY04/textures/word/check_1.png

6.69 KB | W: | H:

assets/BOY04/textures/word/check_1.png
assets/BOY04/textures/word/check_1.png
assets/BOY04/textures/word/check_1.png
assets/BOY04/textures/word/check_1.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -18,11 +18,11 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetX": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 110,
"width": 109,
"height": 110,
"rawWidth": 110,
"rawHeight": 110,
......
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