Commit 3091b000 authored by Tt's avatar Tt

修改bug

parent 4e7ae557
......@@ -2063,8 +2063,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1864,
"height": 1731
"width": 1861,
"height": 1729
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......
......@@ -40,7 +40,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
GameNGT14.getIns().reset();
let data = GameNGT14.getIns().getCurrent();
console.log('gamestart', data)
pg.event.emit('mouse_14_num', GameNGT14.getIns().getLen())
this.scheduleOnce(() => {
pg.event.emit('mouse_14_num', GameNGT14.getIns().getLen())
}, .03)
}
private layout_start: cc.Node;
......@@ -51,6 +53,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initBlocks();
}
onDestory() {
this.unscheduleAllCallbacks();
pg.event.clear();
}
initListener() {
......@@ -70,7 +73,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
let data = GameNGT14.getIns().nextQuestion();
if (!data) {
//游戏结束
this.showFinal();
this.scheduleOnce(() => {
this.showFinal();
}, 1)
} else {
this.gameStart();
}
......@@ -91,9 +96,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
btn_next.active = false;
finish_db.getComponent(dragonBones.ArmatureDisplay).playAnimation("newAnimation", 1);
this.playLocalAudio("finish").then(() => {
finish_db.active = false;
btn_again.active = true;
btn_next.active = true;
this.scheduleOnce(() => {
finish_db.active = false;
btn_again.active = true;
btn_next.active = true;
}, .1)
});
}
......
export const defaultData = {
"questions": [{
"parts": [
{
"id": "166668702213640281", "answer": "freedom", "options": [{
"blocks": [
{
"type": "img", "txt": "", "line": "", "img": "", "tag": "", "image": "http://staging-teach.cdn.ireadabc.com/19ac75d2de5455d268eaef8184bf805b.png"
}]
}, { "blocks": [{ "type": "txt", "txt": "", "line": "", "img": "", "tag": "", "text": "_____ do you go to the park?" }] }, { "blocks": [{ "type": "txt", "txt": "", "line": "", "img": "", "tag": "", "text": "On saturdays freedow" }] }]
},
{
"id": "1666687632465177361", "answer": "want", "options": [{ "blocks": [{ "type": "txt", "txt": "", "line": "", "img": "", "tag": "", "text": "Dave _____ want?" }] }]
},
{
"id": "1666687612725869271", "answer": "fish", "options": [{ "blocks": [{ "type": "img", "txt": "", "line": "", "img": "", "tag": "", "image": "http://staging-teach.cdn.ireadabc.com/3f0f2572da257eedbec51f8d05e2a7d8.png" }] }]
},
{
"id": "1666687646496548891", "answer": "red", "options": [{ "blocks": [{ "type": "txt", "txt": "", "line": "", "img": "", "tag": "", "text": "The fish color is _____ answer red." }] }]
}]
}],
"title": "单词填空", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/4ec3da85d888ad3c5c57e10fca728499.json", "name": "鱼1_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/2c52380a3f3cdd3f5d38870bee2c9ffd.json", "name": "鱼1_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/3ca112e3bb312d5e9b7182bbb97c616d.png", "name": "鱼1_tex.png" } }, "startAudio": "http://staging-teach.cdn.ireadabc.com/e587cf79c91d1cc4339540bb04b2aad0_l.mp3", "blockStruct": [{ "pId": "1666687632465177361", "point": { "x": 2, "y": 2 }, "answer": "want" }, { "pId": "1666687646496548891", "point": { "x": 3, "y": 4 }, "answer": "red" }, { "pId": "1666687612725869271", "point": { "x": 1, "y": 1 }, "answer": "fish" }, { "pId": "166668702213640281", "point": { "x": 0, "y": 0 }, "answer": "freedom" }], "blocks": [[{ "val": "f" }, { "val": "r" }, { "val": "e" }, { "val": "e" }, { "val": "d" }, { "val": "o" }, { "val": "m" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "f" }, { "val": "i" }, { "val": "s" }, { "val": "h" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "" }, { "val": "w" }, { "val": "a" }, { "val": "n" }, { "val": "t" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "" }, { "val": "" }, { "val": "r" }, { "val": "e" }, { "val": "d" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }], [{ "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }, { "val": "" }]], "audioName": ""
......
......@@ -18,12 +18,12 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"offsetX": -1.5,
"offsetY": -1,
"trimX": 0,
"trimY": 0,
"width": 1864,
"height": 1731,
"trimY": 2,
"width": 1861,
"height": 1729,
"rawWidth": 1864,
"rawHeight": 1731,
"borderTop": 0,
......
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