Commit eb5fe7d3 authored by yu's avatar yu

5.21调整

parent bf10a216
...@@ -84,25 +84,25 @@ ...@@ -84,25 +84,25 @@
"__id__": 111 "__id__": 111
}, },
{ {
"__id__": 117 "__id__": 119
}, },
{ {
"__id__": 127 "__id__": 129
}, },
{ {
"__id__": 136 "__id__": 138
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 147 "__id__": 150
}, },
{ {
"__id__": 148 "__id__": 151
}, },
{ {
"__id__": 149 "__id__": 152
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1263,7 +1263,7 @@ ...@@ -1263,7 +1263,7 @@
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
"__uuid__": "c560f528-e166-4884-a854-a9b03f53c904" "__uuid__": "1eb56abf-3596-4a13-904a-7f7310eb738f"
}, },
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
...@@ -5467,7 +5467,10 @@ ...@@ -5467,7 +5467,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 116 "__id__": 117
},
{
"__id__": 118
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5481,8 +5484,8 @@ ...@@ -5481,8 +5484,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 1334,
"height": 0 "height": 750
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5534,6 +5537,9 @@ ...@@ -5534,6 +5537,9 @@
"_components": [ "_components": [
{ {
"__id__": 115 "__id__": 115
},
{
"__id__": 116
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5559,8 +5565,8 @@ ...@@ -5559,8 +5565,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-395.617, -401,
306.737, 262.075,
0, 0,
0, 0,
0, 0,
...@@ -5711,6 +5717,33 @@ ...@@ -5711,6 +5717,33 @@
"_atlas": null, "_atlas": null,
"_id": "48pAdz7GdG36mcICjWyJGN" "_id": "48pAdz7GdG36mcICjWyJGN"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 100,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "606WdhjQNIXJSuBiEVT4vE"
},
{ {
"__type__": "6ea01SYgd1PcYj1tSJPXX7+", "__type__": "6ea01SYgd1PcYj1tSJPXX7+",
"_name": "", "_name": "",
...@@ -5721,6 +5754,33 @@ ...@@ -5721,6 +5754,33 @@
"_enabled": true, "_enabled": true,
"_id": "78N5o1/GhHa5t0r3SoI14W" "_id": "78N5o1/GhHa5t0r3SoI14W"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "20ZQJe+yVGroBlmb3D51f+"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "layout_start", "_name": "layout_start",
...@@ -5729,9 +5789,6 @@ ...@@ -5729,9 +5789,6 @@
"__id__": 2 "__id__": 2
}, },
"_children": [ "_children": [
{
"__id__": 118
},
{ {
"__id__": 120 "__id__": 120
}, },
...@@ -5740,6 +5797,9 @@ ...@@ -5740,6 +5797,9 @@
}, },
{ {
"__id__": 124 "__id__": 124
},
{
"__id__": 126
} }
], ],
"_active": false, "_active": false,
...@@ -5797,13 +5857,13 @@ ...@@ -5797,13 +5857,13 @@
"_name": "New Sprite(Splash)", "_name": "New Sprite(Splash)",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 117 "__id__": 119
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 119 "__id__": 121
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5859,7 +5919,7 @@ ...@@ -5859,7 +5919,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 118 "__id__": 120
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5891,13 +5951,13 @@ ...@@ -5891,13 +5951,13 @@
"_name": "bg_instructions", "_name": "bg_instructions",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 117 "__id__": 119
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 121 "__id__": 123
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5953,7 +6013,7 @@ ...@@ -5953,7 +6013,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 120 "__id__": 122
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5985,13 +6045,13 @@ ...@@ -5985,13 +6045,13 @@
"_name": "desc", "_name": "desc",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 117 "__id__": 119
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 123 "__id__": 125
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6047,7 +6107,7 @@ ...@@ -6047,7 +6107,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 122 "__id__": 124
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6082,16 +6142,16 @@ ...@@ -6082,16 +6142,16 @@
"_name": "btn_start", "_name": "btn_start",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 117 "__id__": 119
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 125 "__id__": 127
}, },
{ {
"__id__": 126 "__id__": 128
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6147,7 +6207,7 @@ ...@@ -6147,7 +6207,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 124 "__id__": 126
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6179,7 +6239,7 @@ ...@@ -6179,7 +6239,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 124 "__id__": 126
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -6240,7 +6300,7 @@ ...@@ -6240,7 +6300,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 124 "__id__": 126
}, },
"_id": "7095HuemhJQ40wHbz5jlAy" "_id": "7095HuemhJQ40wHbz5jlAy"
}, },
...@@ -6253,13 +6313,13 @@ ...@@ -6253,13 +6313,13 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 128 "__id__": 130
}, },
{ {
"__id__": 130 "__id__": 132
}, },
{ {
"__id__": 133 "__id__": 135
} }
], ],
"_active": false, "_active": false,
...@@ -6317,13 +6377,13 @@ ...@@ -6317,13 +6377,13 @@
"_name": "speak_ske", "_name": "speak_ske",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 127 "__id__": 129
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 129 "__id__": 131
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6379,7 +6439,7 @@ ...@@ -6379,7 +6439,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 128 "__id__": 130
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6419,16 +6479,16 @@ ...@@ -6419,16 +6479,16 @@
"_name": "btn_start", "_name": "btn_start",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 127 "__id__": 129
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 131 "__id__": 133
}, },
{ {
"__id__": 132 "__id__": 134
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6484,7 +6544,7 @@ ...@@ -6484,7 +6544,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 130 "__id__": 132
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6516,7 +6576,7 @@ ...@@ -6516,7 +6576,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 130 "__id__": 132
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -6584,16 +6644,16 @@ ...@@ -6584,16 +6644,16 @@
"_name": "btn_stop", "_name": "btn_stop",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 127 "__id__": 129
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 134 "__id__": 136
}, },
{ {
"__id__": 135 "__id__": 137
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6649,7 +6709,7 @@ ...@@ -6649,7 +6709,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 133 "__id__": 135
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6681,7 +6741,7 @@ ...@@ -6681,7 +6741,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 133 "__id__": 135
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -6753,19 +6813,19 @@ ...@@ -6753,19 +6813,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 137 "__id__": 139
}, },
{ {
"__id__": 139 "__id__": 142
}, },
{ {
"__id__": 141 "__id__": 144
}, },
{ {
"__id__": 143 "__id__": 146
}, },
{ {
"__id__": 145 "__id__": 148
} }
], ],
"_active": false, "_active": false,
...@@ -6823,13 +6883,16 @@ ...@@ -6823,13 +6883,16 @@
"_name": "New Sprite(Splash)", "_name": "New Sprite(Splash)",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 136 "__id__": 138
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 138 "__id__": 140
},
{
"__id__": 141
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6885,7 +6948,7 @@ ...@@ -6885,7 +6948,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 137 "__id__": 139
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6912,18 +6975,28 @@ ...@@ -6912,18 +6975,28 @@
"_atlas": null, "_atlas": null,
"_id": "a3H9UTjj1Hsql4qscDXnjg" "_id": "a3H9UTjj1Hsql4qscDXnjg"
}, },
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
},
"_enabled": true,
"_id": "216u5RnsFH1riSR6qX58J/"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "img_light", "_name": "img_light",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 136 "__id__": 138
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 140 "__id__": 143
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6979,7 +7052,7 @@ ...@@ -6979,7 +7052,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 139 "__id__": 142
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7011,13 +7084,13 @@ ...@@ -7011,13 +7084,13 @@
"_name": "img_co", "_name": "img_co",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 136 "__id__": 138
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 142 "__id__": 145
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7073,7 +7146,7 @@ ...@@ -7073,7 +7146,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 141 "__id__": 144
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7105,13 +7178,13 @@ ...@@ -7105,13 +7178,13 @@
"_name": "img_gj", "_name": "img_gj",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 136 "__id__": 138
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 144 "__id__": 147
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7167,7 +7240,7 @@ ...@@ -7167,7 +7240,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 143 "__id__": 146
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7199,13 +7272,13 @@ ...@@ -7199,13 +7272,13 @@
"_name": "img_ta", "_name": "img_ta",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 136 "__id__": 138
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 146 "__id__": 149
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7261,7 +7334,7 @@ ...@@ -7261,7 +7334,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 145 "__id__": 148
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7351,10 +7424,10 @@ ...@@ -7351,10 +7424,10 @@
"__id__": 94 "__id__": 94
}, },
"layout_speak": { "layout_speak": {
"__id__": 127 "__id__": 129
}, },
"layout_tip": { "layout_tip": {
"__id__": 136 "__id__": 138
}, },
"item_gun": { "item_gun": {
"__id__": 42 "__id__": 42
......
...@@ -97,6 +97,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -97,6 +97,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private layout_start: cc.Node; private layout_start: cc.Node;
private audioId: any; private audioId: any;
async initView() { async initView() {
cc.audioEngine.stopAllEffects();
this.layout_start = pg.view.find(this, "layout_start"); this.layout_start = pg.view.find(this, "layout_start");
this.layout_start.active = true; this.layout_start.active = true;
...@@ -325,14 +326,16 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -325,14 +326,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
layout = layout_img; layout = layout_img;
pg.view.setNetImg(pg.view.find(layout_img, 'img'), data.picUrl, { w: 440, h: 286 }) pg.view.setNetImg(pg.view.find(layout_img, 'img'), data.picUrl, { w: 440, h: 286 })
} }
touch.off(cc.Node.EventType.TOUCH_END);
//动画效果 //动画效果
this.playLocalAudio("card").then(() => { this.playLocalAudio("card").then(() => {
pg.audio.playAudioByUrl(data.audioUrl); pg.audio.playAudioByUrl(data.audioUrl, () => {
}) touch.on(cc.Node.EventType.TOUCH_END, () => {
touch.off(cc.Node.EventType.TOUCH_END); pg.audio.playAudioByUrl(data.audioUrl);
touch.on(cc.Node.EventType.TOUCH_END, () => { })
pg.audio.playAudioByUrl(data.audioUrl); });
}) })
layout.active = true; layout.active = true;
layout.opacity = 255; layout.opacity = 255;
layout.scale = 0.1; layout.scale = 0.1;
...@@ -554,7 +557,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -554,7 +557,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async recrodEnd(data) { async recrodEnd(data) {
Game.getIns().player.addVoice(data); Game.getIns().player.addVoice(data);
let score = data.result.overall; let score = data.result.overall;
if (score >= 80) { if (score >= 70) {
//提示成功 //提示成功
this.updateTips(TIPS_STATE.GOOD); this.updateTips(TIPS_STATE.GOOD);
Game.getIns().player.addRight(); Game.getIns().player.addRight();
...@@ -565,7 +568,15 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -565,7 +568,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (this.tryData.some(td => td.id == this.touchData.id)) { if (this.tryData.some(td => td.id == this.touchData.id)) {
this.updateTips(TIPS_STATE.COM); this.updateTips(TIPS_STATE.COM);
this.touchFishs.push(this.touchData); this.touchFishs.push(this.touchData);
this.tryAgain = false; if (this.tryAgain) {
this.tryAgain = false;
this.playCard(null);
this.updateLayoutSpeak(true);
this.updateTips(null);
this.touching = false;
Game.getIns().state = GAME_STATE.OVER
return pg.event.emit("game_time_over");
}
} else { } else {
this.updateTips(TIPS_STATE.TRY); this.updateTips(TIPS_STATE.TRY);
this.tryData.push(this.touchData); this.tryData.push(this.touchData);
......
...@@ -518,12 +518,13 @@ let pg = { ...@@ -518,12 +518,13 @@ let pg = {
} }
}, },
audio: { audio: {
playAudioByUrl(audio_url) { playAudioByUrl(audio_url, cb = null) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!audio_url) return resolve(null); if (!audio_url) return resolve(null);
cc.assetManager.loadRemote(audio_url, (err, audioClip: any) => { cc.assetManager.loadRemote(audio_url, (err, audioClip: any) => {5
const audioId = cc.audioEngine.play(audioClip, false, 0.8); const audioId = cc.audioEngine.play(audioClip, false, 0.8);
cc.audioEngine.setFinishCallback(audioId, () => { cc.audioEngine.setFinishCallback(audioId, () => {
cb && cb();
}); });
resolve(audioId); resolve(audioId);
}); });
...@@ -538,7 +539,7 @@ let pg = { ...@@ -538,7 +539,7 @@ let pg = {
const audioId = cc.audioEngine.playEffect(audioClip, false); const audioId = cc.audioEngine.playEffect(audioClip, false);
if (cb) { if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => { cc.audioEngine.setFinishCallback(audioId, () => {
cb(); cb && cb();
}); });
} }
......
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