Commit 69cbd83b authored by Tt's avatar Tt

细节调整

parent e7c9b796
...@@ -5702,7 +5702,7 @@ ...@@ -5702,7 +5702,7 @@
"__id__": 139 "__id__": 139
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 141 "__id__": 141
...@@ -5731,8 +5731,8 @@ ...@@ -5731,8 +5731,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, -679.396,
0, 858.509,
0, 0,
0, 0,
0, 0,
...@@ -5952,7 +5952,7 @@ ...@@ -5952,7 +5952,7 @@
"__id__": 124 "__id__": 124
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 130 "__id__": 130
...@@ -6075,7 +6075,7 @@ ...@@ -6075,7 +6075,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 390, "width": 390,
"height": 136 "height": 90
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -6126,10 +6126,10 @@ ...@@ -6126,10 +6126,10 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "intnationnal", "_string": "APPLEAPPLELE",
"_N$string": "intnationnal", "_N$string": "APPLEAPPLELE",
"_fontSize": 60, "_fontSize": 53,
"_lineHeight": 100, "_lineHeight": 50,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": { "_N$file": {
"__uuid__": "d33f4fd5-4b20-4277-afd2-034823475089" "__uuid__": "d33f4fd5-4b20-4277-afd2-034823475089"
...@@ -6161,7 +6161,7 @@ ...@@ -6161,7 +6161,7 @@
"b": 184, "b": 184,
"a": 255 "a": 255
}, },
"_width": 5, "_width": 4,
"_id": "5bZD08nfxJBo02tZmYwJ01" "_id": "5bZD08nfxJBo02tZmYwJ01"
}, },
{ {
...@@ -6192,8 +6192,8 @@ ...@@ -6192,8 +6192,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 300.5, "width": 300,
"height": 136 "height": 60
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -6244,9 +6244,9 @@ ...@@ -6244,9 +6244,9 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "intnationnal", "_string": "APPLEAPPLELE",
"_N$string": "intnationnal", "_N$string": "APPLEAPPLELE",
"_fontSize": 50, "_fontSize": 41,
"_lineHeight": 50, "_lineHeight": 50,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": { "_N$file": {
...@@ -6279,7 +6279,7 @@ ...@@ -6279,7 +6279,7 @@
"b": 184, "b": 184,
"a": 255 "a": 255
}, },
"_width": 5, "_width": 4,
"_id": "56Kq68ZbFOq7anD7fXhhG4" "_id": "56Kq68ZbFOq7anD7fXhhG4"
}, },
{ {
...@@ -6290,7 +6290,7 @@ ...@@ -6290,7 +6290,7 @@
"__id__": 124 "__id__": 124
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 138 "__id__": 138
...@@ -6384,7 +6384,7 @@ ...@@ -6384,7 +6384,7 @@
"__id__": 124 "__id__": 124
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 140 "__id__": 140
...@@ -7805,7 +7805,7 @@ ...@@ -7805,7 +7805,7 @@
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "layout_start", "_name": "layout_start",
"_objFlags": 0, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 2 "__id__": 2
}, },
...@@ -10342,7 +10342,7 @@ ...@@ -10342,7 +10342,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-224, -224,
14.956, -22.946,
0, 0,
0, 0,
0, 0,
...@@ -10436,7 +10436,7 @@ ...@@ -10436,7 +10436,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
224, 224,
14.956, -22.946,
0, 0,
0, 0,
0, 0,
...@@ -10815,7 +10815,7 @@ ...@@ -10815,7 +10815,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-236.493, -236.493,
-68.413, -106.315,
0, 0,
0, 0,
0, 0,
...@@ -10912,7 +10912,7 @@ ...@@ -10912,7 +10912,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
236.494, 236.494,
-68.413, -106.315,
0, 0,
0, 0,
0, 0,
...@@ -11009,7 +11009,7 @@ ...@@ -11009,7 +11009,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-237.943, -237.943,
52.086, 14.184,
0, 0,
0, 0,
0, 0,
...@@ -11106,7 +11106,7 @@ ...@@ -11106,7 +11106,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
225.785, 225.785,
52.086, 14.184,
0, 0,
0, 0,
0, 0,
......
...@@ -100,6 +100,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -100,6 +100,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
Game.getIns().init(this.data); Game.getIns().init(this.data);
Game.getIns().reset(); Game.getIns().reset();
this.tryData = []; this.tryData = [];
this.timers = []
this.starData = null; this.starData = null;
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this.starData = Game.getIns().getCurrentPage(); this.starData = Game.getIns().getCurrentPage();
...@@ -203,6 +204,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -203,6 +204,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
let item = this.layout_game.getChildByName('item') let item = this.layout_game.getChildByName('item')
let list = this.starData.options; let list = this.starData.options;
for (let i = 0; i < 10; i++) {
list.sort(() => Math.random() < 0.5 ? 1 : -1)
}
let startPos = pg.view.coverPosition(btn_fish, layout_play) let startPos = pg.view.coverPosition(btn_fish, layout_play)
let layouts = layout_pop.getChildByName("layout_" + list.length) let layouts = layout_pop.getChildByName("layout_" + list.length)
list.forEach((li, index) => { list.forEach((li, index) => {
...@@ -265,6 +269,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -265,6 +269,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.touchOn(item, this.onTouchItem, this); pg.view.touchOn(item, this.onTouchItem, this);
} }
private touching: boolean; private touching: boolean;
private timers: Array<any>;
onTouchItem(e) { onTouchItem(e) {
if (this.touching) return; if (this.touching) return;
this.touching = true; this.touching = true;
...@@ -274,9 +279,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -274,9 +279,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.touching = false; this.touching = false;
return; return;
} }
setTimeout(() => { this.scheduleOnce(() => {
this.touching = false; this.touching = false;
}, 600); }, 0.6)
this.assessCount++; this.assessCount++;
this.stopLaba(); this.stopLaba();
if (data.right) { if (data.right) {
...@@ -287,9 +292,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -287,9 +292,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.starData.addRight(data); this.starData.addRight(data);
this.playLocalAudio('fish_right') this.playLocalAudio('fish_right')
if (this.starData.checkRight()) { if (this.starData.checkRight()) {
setTimeout(() => { this.scheduleOnce(() => {
this.nextstar(); this.nextstar();
}, 800); }, 0.8)
} }
} else { } else {
this.playLocalAudio('fish_error') this.playLocalAudio('fish_error')
......
...@@ -34,21 +34,21 @@ export default class fishs extends cc.Component { ...@@ -34,21 +34,21 @@ export default class fishs extends cc.Component {
// 默认位置在左侧 // 默认位置在左侧
this.startPos = this.left2Right ? this.leftPos[this.index - 1] : this.rightPos[this.index - 1]; this.startPos = this.left2Right ? this.leftPos[this.index - 1] : this.rightPos[this.index - 1];
this.endPos = this.left2Right ? this.rightPos[this.index - 1] : this.leftPos[this.index - 1]; this.endPos = this.left2Right ? this.rightPos[this.index - 1] : this.leftPos[this.index - 1];
this.timer = setTimeout(() => { this.scheduleOnce(this.startMove, 1)
this.startMove(); }
}, this.waitTime * 1000); onDestroy() {
if (this.timer) clearTimeout(this.timer);
} }
startMove() { startMove() {
this.node.setPosition(this.startPos); this.node.setPosition(this.startPos);
cc.tween(this.node).to(this.costTime, { x: this.endPos.x, y: this.endPos.y }).start(); cc.tween(this.node).to(this.costTime, { x: this.endPos.x, y: this.endPos.y }).start();
this.timer = setTimeout(() => { this.scheduleOnce(this.startMove, this.costTime)
this.startMove();
}, this.costTime * 1000 + 100);
} }
stopMove() { stopMove() {
cc.Tween.stopAllByTarget(this.node); cc.Tween.stopAllByTarget(this.node);
this.timer && clearTimeout(this.timer); this.unschedule(this.startMove);
// this.timer && clearTimeout(this.timer);
} }
start() { start() {
......
export const defaultData = { "title": "听音选择", "questions": [{ "audio": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3", "time": null, "duration": "", "audioName": "进入下一题.mp3", "options": [{ "type": "text", "audio": "", "image": "", "word": "", "text": "appleappleap", "isRight": "1" }, { "type": "text", "audio": "", "image": "", "word": "", "text": "banner", "isRight": "0" }, { "type": "text", "audio": "", "image": "", "word": "", "text": "pie", "isRight": "0" }, { "type": "text", "audio": "", "image": "", "word": "", "text": "test", "isRight": "1" }] }, { "audio": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3", "time": null, "duration": "", "audioName": "进入下一题.mp3", "options": [{ "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/07c89b4a6a1a18b0c0a3029720fdfdbc.png", "word": "", "isRight": "0" }, { "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/d20b34eac11f5687d3386389aea170a2.png", "word": "", "isRight": "0" }, { "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/639ada88f3e52966103caca156f720d6.png", "word": "", "isRight": "1" }, { "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/38408b9ce048508830086c5e5cd2f384.png", "word": "", "isRight": "1" }] }, { "audio": "", "time": null, "duration": "", "audioName": "", "options": [{ "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/3f36264d6aaa65e578a6d7e261ea8a2e.png", "isRight": "1", "text": "fish" }, { "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/713e3312f1ed1876baf169026654d0c2.png", "isRight": "0", "text": "gray" }, { "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/23290ec65a6700c931105c52aaf4e24c.jpg", "isRight": "0", "text": "international" }, { "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/912b16d5a85e46fa5b0e2b75fb9d6bdf.png", "isRight": "0", "text": "break" }] }] } export const defaultData = {
\ No newline at end of file "title": "听音选择", "questions": [{
"audio": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3",
"time": null, "duration": "", "audioName": "进入下一题.mp3",
"options": [{ "type": "text", "audio": "", "image": "", "word": "", "text": "APPLEAPPLEAL", "isRight": "1" }, { "type": "text", "audio": "", "image": "", "word": "", "text": "banner", "isRight": "0" }, { "type": "text", "audio": "", "image": "", "word": "", "text": "pie", "isRight": "0" }, { "type": "text", "audio": "", "image": "", "word": "", "text": "test", "isRight": "1" }]
}, { "audio": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3", "time": null, "duration": "", "audioName": "进入下一题.mp3", "options": [{ "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/07c89b4a6a1a18b0c0a3029720fdfdbc.png", "word": "", "isRight": "0" }, { "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/d20b34eac11f5687d3386389aea170a2.png", "word": "", "isRight": "0" }, { "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/639ada88f3e52966103caca156f720d6.png", "word": "", "isRight": "1" }, { "type": "img", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/38408b9ce048508830086c5e5cd2f384.png", "word": "", "isRight": "1" }] }, { "audio": "", "time": null, "duration": "", "audioName": "", "options": [{ "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/3f36264d6aaa65e578a6d7e261ea8a2e.png", "isRight": "1", "text": "fish" }, { "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/713e3312f1ed1876baf169026654d0c2.png", "isRight": "0", "text": "gray" }, { "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/23290ec65a6700c931105c52aaf4e24c.jpg", "isRight": "0", "text": "international" }, { "type": "img_text", "audio": "", "image": "http://staging-teach.cdn.ireadabc.com/912b16d5a85e46fa5b0e2b75fb9d6bdf.png", "isRight": "0", "text": "break" }] }]
}
\ 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