Commit 69cbd83b authored by Tt's avatar Tt

细节调整

parent e7c9b796
......@@ -5702,7 +5702,7 @@
"__id__": 139
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 141
......@@ -5731,8 +5731,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
-679.396,
858.509,
0,
0,
0,
......@@ -5952,7 +5952,7 @@
"__id__": 124
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 130
......@@ -6075,7 +6075,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 390,
"height": 136
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6126,10 +6126,10 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "intnationnal",
"_N$string": "intnationnal",
"_fontSize": 60,
"_lineHeight": 100,
"_string": "APPLEAPPLELE",
"_N$string": "APPLEAPPLELE",
"_fontSize": 53,
"_lineHeight": 50,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "d33f4fd5-4b20-4277-afd2-034823475089"
......@@ -6161,7 +6161,7 @@
"b": 184,
"a": 255
},
"_width": 5,
"_width": 4,
"_id": "5bZD08nfxJBo02tZmYwJ01"
},
{
......@@ -6192,8 +6192,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 300.5,
"height": 136
"width": 300,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6244,9 +6244,9 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "intnationnal",
"_N$string": "intnationnal",
"_fontSize": 50,
"_string": "APPLEAPPLELE",
"_N$string": "APPLEAPPLELE",
"_fontSize": 41,
"_lineHeight": 50,
"_enableWrapText": true,
"_N$file": {
......@@ -6279,7 +6279,7 @@
"b": 184,
"a": 255
},
"_width": 5,
"_width": 4,
"_id": "56Kq68ZbFOq7anD7fXhhG4"
},
{
......@@ -6290,7 +6290,7 @@
"__id__": 124
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 138
......@@ -6384,7 +6384,7 @@
"__id__": 124
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 140
......@@ -7805,7 +7805,7 @@
{
"__type__": "cc.Node",
"_name": "layout_start",
"_objFlags": 0,
"_objFlags": 512,
"_parent": {
"__id__": 2
},
......@@ -10342,7 +10342,7 @@
"ctor": "Float64Array",
"array": [
-224,
14.956,
-22.946,
0,
0,
0,
......@@ -10436,7 +10436,7 @@
"ctor": "Float64Array",
"array": [
224,
14.956,
-22.946,
0,
0,
0,
......@@ -10815,7 +10815,7 @@
"ctor": "Float64Array",
"array": [
-236.493,
-68.413,
-106.315,
0,
0,
0,
......@@ -10912,7 +10912,7 @@
"ctor": "Float64Array",
"array": [
236.494,
-68.413,
-106.315,
0,
0,
0,
......@@ -11009,7 +11009,7 @@
"ctor": "Float64Array",
"array": [
-237.943,
52.086,
14.184,
0,
0,
0,
......@@ -11106,7 +11106,7 @@
"ctor": "Float64Array",
"array": [
225.785,
52.086,
14.184,
0,
0,
0,
......
......@@ -100,6 +100,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
Game.getIns().init(this.data);
Game.getIns().reset();
this.tryData = [];
this.timers = []
this.starData = null;
// 所有全局变量 默认都是null
this.starData = Game.getIns().getCurrentPage();
......@@ -203,6 +204,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
let item = this.layout_game.getChildByName('item')
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 layouts = layout_pop.getChildByName("layout_" + list.length)
list.forEach((li, index) => {
......@@ -265,6 +269,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.touchOn(item, this.onTouchItem, this);
}
private touching: boolean;
private timers: Array<any>;
onTouchItem(e) {
if (this.touching) return;
this.touching = true;
......@@ -274,9 +279,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.touching = false;
return;
}
setTimeout(() => {
this.scheduleOnce(() => {
this.touching = false;
}, 600);
}, 0.6)
this.assessCount++;
this.stopLaba();
if (data.right) {
......@@ -287,9 +292,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.starData.addRight(data);
this.playLocalAudio('fish_right')
if (this.starData.checkRight()) {
setTimeout(() => {
this.scheduleOnce(() => {
this.nextstar();
}, 800);
}, 0.8)
}
} else {
this.playLocalAudio('fish_error')
......
......@@ -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.endPos = this.left2Right ? this.rightPos[this.index - 1] : this.leftPos[this.index - 1];
this.timer = setTimeout(() => {
this.startMove();
}, this.waitTime * 1000);
this.scheduleOnce(this.startMove, 1)
}
onDestroy() {
if (this.timer) clearTimeout(this.timer);
}
startMove() {
this.node.setPosition(this.startPos);
cc.tween(this.node).to(this.costTime, { x: this.endPos.x, y: this.endPos.y }).start();
this.timer = setTimeout(() => {
this.startMove();
}, this.costTime * 1000 + 100);
this.scheduleOnce(this.startMove, this.costTime)
}
stopMove() {
cc.Tween.stopAllByTarget(this.node);
this.timer && clearTimeout(this.timer);
this.unschedule(this.startMove);
// this.timer && clearTimeout(this.timer);
}
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" }] }] }
\ No newline at end of file
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": "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