Commit 61af40e4 authored by yu's avatar yu

10.9bug调整

parent d92a726b
{
"ver": "2.0.1",
"uuid": "13e38c76-7212-4b17-b3b1-eb27b7ae141c",
"downloadMode": 0,
"duration": 0.182857,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
...@@ -126,13 +126,30 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -126,13 +126,30 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.layout_final.active = false; this.layout_final.active = false;
this.label_time.getComponent(cc.Label).string = "00:00"; this.label_time.getComponent(cc.Label).string = "00:00";
pg.event.clear(); pg.event.clear();
this.cleanBridge();
this.onLoadEnd(); this.onLoadEnd();
} }
private onCloseFinal() { private onCloseFinal() {
this.playLocalAudio("btn"); this.playLocalAudio("btn");
this.layout_final.active = false; this.layout_final.active = false;
} }
private cleanBridge() {
let bridge_4 = cc.find("bridge_4", this.layout_game);
bridge_4.children.forEach((ch) => {
let word = cc.find("word", ch);
word.getComponent(cc.Label).string = "";
})
let bridge_8 = cc.find("bridge_8", this.layout_game);
bridge_8.children.forEach((ch) => {
let word = cc.find("word", ch);
word.getComponent(cc.Label).string = "";
})
let bridge_12 = cc.find("bridge_12", this.layout_game);
bridge_12.children.forEach((ch) => {
let word = cc.find("word", ch);
word.getComponent(cc.Label).string = "";
})
}
private gameOver() { private gameOver() {
Game.getIns().state = GAME_STATE.OVER; Game.getIns().state = GAME_STATE.OVER;
...@@ -167,11 +184,17 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -167,11 +184,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
layout_cloud.active = true; layout_cloud.active = true;
layout_bridge.active = true; layout_bridge.active = true;
data.wordArr.sort(function () {
return (0.5 - Math.random());
});
layout_cloud.children.forEach((ch, idx) => { layout_cloud.children.forEach((ch, idx) => {
let c_d = data.wordArr[idx]; let c_d = data.wordArr[idx];
if (!c_d) ch.active = false;
this.initCloudItem(ch, c_d); this.initCloudItem(ch, c_d);
}); });
layout_bridge.children.forEach((item, idx) => { layout_bridge.children.forEach((item, idx) => {
let c_d = data.wordArr[idx];
if (!c_d) item.active = false;
let word = cc.find("word", item); let word = cc.find("word", item);
word.getComponent(cc.Label).string = ""; word.getComponent(cc.Label).string = "";
word.active = false; word.active = false;
...@@ -233,7 +256,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -233,7 +256,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
onItemTouchStart(e) { onItemTouchStart(e) {
this.playLocalAudio("clickcard"); this.playLocalAudio("takeout");
// if (this.checkRoundOver()) return; // if (this.checkRoundOver()) return;
let target: cc.Node = e.target; let target: cc.Node = e.target;
let data = target.data; let data = target.data;
...@@ -275,6 +298,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -275,6 +298,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
word.active = true; word.active = true;
word.getComponent(cc.Label).string = data.text; word.getComponent(cc.Label).string = data.text;
this.playLocalAudio("move")
if (this.checkRoundOver()) { if (this.checkRoundOver()) {
if (this.checkMoveRight()) { if (this.checkMoveRight()) {
this.playLocalAudio("right"); this.playLocalAudio("right");
...@@ -296,10 +320,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -296,10 +320,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else { } else {
Game.getIns().failCount++; Game.getIns().failCount++;
this.playLocalAudio("error"); this.playLocalAudio("error").then(() => {
this.showQuestion(); this.showQuestion();
});
} }
} }
} }
...@@ -361,7 +387,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -361,7 +387,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showFind(); this.showFind();
} else { } else {
this.playLocalAudio("next").then(() => { this.playLocalAudio("next").then(() => {
this.startTime(); // this.startTime();
this.gameStart();
}); });
} }
......
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "86aafc5c-7daa-4c8d-afb0-ba0fd8997b38", "uuid": "9c241603-f677-4422-8c2a-404153fc4366",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
...@@ -40,12 +40,12 @@ export const defaultData = { ...@@ -40,12 +40,12 @@ export const defaultData = {
"check": 1 "check": 1
}, },
{ {
"text": "l", "text": "le",
"block": false, "block": false,
"check": 1 "check": 1
}, },
{ {
"text": "e", "text": "",
"block": false, "block": false,
"check": 1 "check": 1
} }
...@@ -119,74 +119,74 @@ export const defaultData = { ...@@ -119,74 +119,74 @@ export const defaultData = {
"text": "", "text": "",
"audioName": "move.mp3" "audioName": "move.mp3"
}, },
{ // {
"options": [], // "options": [],
"contentArr": [ // "contentArr": [
{ // {
"text": "i", // "text": "i",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "n", // "text": "n",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "t", // "text": "t",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "e", // "text": "e",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "r", // "text": "r",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "n", // "text": "n",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "a", // "text": "a",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "t", // "text": "t",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "i", // "text": "i",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "o", // "text": "o",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "n", // "text": "n",
"block": false, // "block": false,
"check": 1 // "check": 1
}, // },
{ // {
"text": "al", // "text": "al",
"block": false, // "block": false,
"check": 1 // "check": 1
} // }
], // ],
"audio": "http://staging-teach.cdn.ireadabc.com/a053d5915bc3b6f0ec8a42912891c538_l.mp3", // "audio": "http://staging-teach.cdn.ireadabc.com/a053d5915bc3b6f0ec8a42912891c538_l.mp3",
"contentMain": "i n t e r n a t i o n al", // "contentMain": "i n t e r n a t i o n al",
"text": "", // "text": "",
"audioName": "next.mp3" // "audioName": "next.mp3"
} // }
] ]
} }
\ No newline at end of file
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