Commit eb5fe7d3 authored by yu's avatar yu

5.21调整

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