Commit f8ba5ef3 authored by Tt's avatar Tt

音效添加完成

parent afee7527
{
"ver": "2.0.1",
"uuid": "67e3f84a-468b-45cd-b563-afcfddc80aee",
"downloadMode": 0,
"duration": 48.039184,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "fb1b00f8-5a5f-4e14-8b4f-74086255de51",
"downloadMode": 0,
"duration": 1.28,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "1a0d674e-d9e2-43d5-bd71-baf85e7630fe",
"downloadMode": 0,
"duration": 0.219333,
"subMetas": {}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
"__id__": 2
},
{
"__id__": 184
"__id__": 190
}
],
"_active": false,
......@@ -108,13 +108,13 @@
"_active": true,
"_components": [
{
"__id__": 181
"__id__": 187
},
{
"__id__": 182
"__id__": 188
},
{
"__id__": 183
"__id__": 189
}
],
"_prefab": null,
......@@ -7285,6 +7285,15 @@
},
{
"__id__": 179
},
{
"__id__": 181
},
{
"__id__": 183
},
{
"__id__": 185
}
],
"_active": true,
......@@ -8552,6 +8561,249 @@
"preload": false,
"_id": "bc6jlY6wxE07Nng/117uNJ"
},
{
"__type__": "cc.Node",
"_name": "touch",
"_objFlags": 0,
"_parent": {
"__id__": 150
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 182
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "59kAB2WgxLg4NKkrWFxrAY"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 181
},
"_enabled": true,
"_clip": {
"__uuid__": "1a0d674e-d9e2-43d5-bd71-baf85e7630fe"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "767IHa5NpBHqK9ft/HIB3O"
},
{
"__type__": "cc.Node",
"_name": "move",
"_objFlags": 0,
"_parent": {
"__id__": 150
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 184
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "09qLPZnbBIa7pnTc/GS9Le"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 183
},
"_enabled": true,
"_clip": {
"__uuid__": "fb1b00f8-5a5f-4e14-8b4f-74086255de51"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "e2Xf0la7BBaru7W3tLYoLH"
},
{
"__type__": "cc.Node",
"_name": "background",
"_objFlags": 0,
"_parent": {
"__id__": 150
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 186
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "aeMiKzGUlI7J52QeoAyxOh"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
},
"_enabled": true,
"_clip": {
"__uuid__": "67e3f84a-468b-45cd-b563-afcfddc80aee"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "84iDxbMXpEcKqS4poPwSVA"
},
{
"__type__": "cc.Canvas",
"_name": "",
......@@ -8643,6 +8895,9 @@
"btn_close": {
"__id__": 84
},
"bgmNode": {
"__id__": 185
},
"_id": "eaTVUpqahPfZeO9+sUI7RP"
},
{
......@@ -8653,12 +8908,6 @@
"__id__": 1
},
"_children": [
{
"__id__": 185
},
{
"__id__": 188
},
{
"__id__": 191
},
......@@ -8676,12 +8925,18 @@
},
{
"__id__": 206
},
{
"__id__": 209
},
{
"__id__": 212
}
],
"_active": false,
"_components": [],
"_prefab": {
"__id__": 209
"__id__": 215
},
"_opacity": 255,
"_color": {
......@@ -8735,17 +8990,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 186
"__id__": 192
}
],
"_prefab": {
"__id__": 187
"__id__": 193
},
"_opacity": 255,
"_color": {
......@@ -8799,7 +9054,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
"__id__": 191
},
"_enabled": true,
"_materials": [
......@@ -8829,7 +9084,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -8842,17 +9097,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 189
"__id__": 195
}
],
"_prefab": {
"__id__": 190
"__id__": 196
},
"_opacity": 255,
"_color": {
......@@ -8906,7 +9161,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 188
"__id__": 194
},
"_enabled": true,
"_materials": [
......@@ -8936,7 +9191,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -8949,17 +9204,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 192
"__id__": 198
}
],
"_prefab": {
"__id__": 193
"__id__": 199
},
"_opacity": 255,
"_color": {
......@@ -9013,7 +9268,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 191
"__id__": 197
},
"_enabled": true,
"_materials": [
......@@ -9043,7 +9298,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -9056,17 +9311,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 195
"__id__": 201
}
],
"_prefab": {
"__id__": 196
"__id__": 202
},
"_opacity": 255,
"_color": {
......@@ -9120,7 +9375,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 194
"__id__": 200
},
"_enabled": true,
"_materials": [
......@@ -9150,7 +9405,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -9163,17 +9418,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 198
"__id__": 204
}
],
"_prefab": {
"__id__": 199
"__id__": 205
},
"_opacity": 255,
"_color": {
......@@ -9227,7 +9482,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 197
"__id__": 203
},
"_enabled": true,
"_materials": [
......@@ -9257,7 +9512,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -9270,17 +9525,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 201
"__id__": 207
}
],
"_prefab": {
"__id__": 202
"__id__": 208
},
"_opacity": 255,
"_color": {
......@@ -9334,7 +9589,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 200
"__id__": 206
},
"_enabled": true,
"_materials": [
......@@ -9364,7 +9619,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -9377,17 +9632,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 204
"__id__": 210
}
],
"_prefab": {
"__id__": 205
"__id__": 211
},
"_opacity": 255,
"_color": {
......@@ -9441,7 +9696,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 203
"__id__": 209
},
"_enabled": true,
"_materials": [
......@@ -9471,7 +9726,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -9484,17 +9739,17 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 190
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 207
"__id__": 213
}
],
"_prefab": {
"__id__": 208
"__id__": 214
},
"_opacity": 255,
"_color": {
......@@ -9548,7 +9803,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 206
"__id__": 212
},
"_enabled": true,
"_materials": [
......@@ -9578,7 +9833,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......@@ -9589,7 +9844,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 190
},
"asset": {
"__uuid__": "f64b76f1-fff3-40d6-8eb6-07f263db799d"
......
......@@ -123,6 +123,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private voiceTouchForbid: boolean;
private count: number;
initGame() {
cc.audioEngine.playMusic(this.bgmNode.getComponent(cc.AudioSource).clip, true);
this.count = 0;
this.touchForbid = true;
this.voiceTouchForbid = true;
......@@ -489,7 +490,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let posArray = posList[data.options.length];
let posY = this.card_pos.y;
// 计算Y的值
// let img = pg.view.find(layer, 'title/img')
// pg.view.setNetImg(img, data.image, { w: 660, h: 320 })
......@@ -537,6 +538,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private btn_start: cc.Node = null;
onTouchStart(e) {
if (this.touchForbid) return;// 顶级禁止全部点击
this.playLocalAudio("touch")
cc.Tween.stopAllByTarget(this.btn_start)
this.btn_start.scale = 1;
this.touchForbid = true;
......@@ -563,6 +565,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.currentDt = data;
this.touchForbid = true;
this.playLocalAudio("move")
cc.tween(this.gou_node)
// 移动钩子
.to(0.5, { x: item.x })
......@@ -606,9 +610,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
private btn_close: cc.Node = null;
showRecord(item) {
let startPos = cc.v2(item);
cc.tween(item).to(0.3, { y: startPos.y + 50 }).call(() => {
this.playBgmP10();
item.active = false;
item.y = startPos.y;
......@@ -680,6 +685,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
clearTimeout(this.btn_voice_time_id)
this.btn_voice_time_id = null;
}
this.pauseBgm();
// 录音
let btn_voice = e.target;
let normal = pg.view.find(btn_voice, 'normal')
......@@ -700,6 +706,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
let score = recordData.result.overall
this.updatePopAni(null, score);
this.checkCardsTime = 3;
this.resumeBgm();
this.playBgmP100();
})
} else {
this.recording = true;
......@@ -911,6 +919,50 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
})
}
@property(cc.Node)
bgmNode: cc.Node = null;
playBgmP10() {
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.8);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.6);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.4);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.2);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.1);
}, 0.4)
}, 0.4)
}, 0.4)
}, 0.4)
}, 0.4)
}
pauseBgm() {
cc.audioEngine.pauseMusic();
}
resumeBgm() {
cc.audioEngine.resumeMusic();
}
playBgmP100() {
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.2);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.4);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.6);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(0.8);
this.scheduleOnce(() => {
cc.audioEngine.setMusicVolume(1);
}, 0.4)
}, 0.4)
}, 0.4)
}, 0.4)
}, 0.4)
}
}
......
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