Commit e4bbc241 authored by Tt's avatar Tt

修改正确后的流程逻辑

parent 0184c1c6
......@@ -182,7 +182,7 @@ export default class NewClass extends cc.Component {
let img_add = pg.view.find(item, 'img_add')
pg.view.visible(img_add, true);
img_add.position = cc.v3(cc.v2(135, 70));
cc.tween(img_add).by(0.5, { y: 80 }).delay(3).call(() => {
cc.tween(img_add).by(0.5, { y: 80 }).delay(1).call(() => {
pg.view.visible(img_add, false);
resolve("")
}).start();
......@@ -213,7 +213,7 @@ export default class NewClass extends cc.Component {
let mouse_wrong = pg.view.find(item, "mask/mouse_wrong");
// 点击之后判断对错。
if (data.right) {
this.playLocalAudio('right');
this.right.push(data);
let isOver = this.right.length >= Game.getIns().getCurrentPageRight()
if (isOver) {
......@@ -228,13 +228,15 @@ export default class NewClass extends cc.Component {
this.robotAddOne();
}
let startPos = cc.v2(10, -114);
this.playLocalAudio('right')
this.playAddOne(item).then(() => {
pg.audio.playAudioByUrlThen(data.audioUrl).then(() => {
if (isOver) {
this.scaleTo0();
} else {
let orgPos = cc.v2(mouse_right);
cc.tween(mouse_normal).to(0.5, { y: startPos.y }).call(() => { }).start();
cc.tween(mouse_right).delay(1.5).to(0.5, { y: startPos.y }).call(() => {
cc.tween(mouse_right).delay(0.5).to(0.5, { y: startPos.y }).call(() => {
mouse_right.x = orgPos.x;
mouse_right.y = orgPos.y;
mouse_right.active = false;
......@@ -251,6 +253,7 @@ export default class NewClass extends cc.Component {
return pg.event.emit("game_time_over");
}
})
})
} else {
this.playLocalAudio('error');
mouse_normal.active = false;
......
......@@ -275,7 +275,7 @@
"__id__": 16
}
],
"_active": false,
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
......@@ -419,7 +419,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -463,7 +463,11 @@
"__id__": 7
},
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
......@@ -512,7 +516,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -556,7 +560,11 @@
"__id__": 9
},
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
......@@ -605,7 +613,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -649,7 +657,11 @@
"__id__": 11
},
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
......@@ -804,7 +816,11 @@
"__id__": 14
},
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
......@@ -4177,8 +4193,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 50.4
"width": 139.74,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4245,7 +4261,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "98V92Z1ClMVrrUKmZB8Vzo"
},
......@@ -4539,8 +4555,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 50.4
"width": 139.74,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4607,7 +4623,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "49s1h6X8tJtpXkR3LzYS43"
},
......@@ -4831,8 +4847,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 50.4
"width": 136.38,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4883,8 +4899,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_string": "apple",
"_N$string": "apple",
"_fontSize": 60,
"_lineHeight": 60,
"_enableWrapText": true,
......@@ -4899,7 +4915,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "e5MQB3C9NDMaLIX5ihC7yy"
},
......@@ -7029,7 +7045,7 @@
"__id__": 158
}
],
"_active": true,
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
......
......@@ -125,8 +125,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
let totalNumber = Game.getIns().totalNumber;
if (Game.getIns().singleGame) {
this.log("player: " + JSON.stringify({ player, totalNumber }));
onHomeworkFinish({ player, totalNumber })
} else {
this.log("player: " + JSON.stringify({ player, robot, totalNumber }));
onHomeworkFinish({ player, robot, totalNumber })
}
this.log("player: " + JSON.stringify(player));
......
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