Commit e4bbc241 authored by Tt's avatar Tt

修改正确后的流程逻辑

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