Commit 973809d7 authored by Li MingZhe's avatar Li MingZhe

feat: scroll audio

parent a621fdcd
{
"ver": "2.0.1",
"uuid": "9c0a0fe2-0759-4968-a670-023cc4dffe26",
"downloadMode": 0,
"duration": 1.515102,
"subMetas": {}
}
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"__id__": 2 "__id__": 2
}, },
{ {
"__id__": 89 "__id__": 91
} }
], ],
"_active": false, "_active": false,
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 86 "__id__": 88
}, },
{ {
"__id__": 87 "__id__": 89
}, },
{ {
"__id__": 88 "__id__": 90
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3355,6 +3355,9 @@ ...@@ -3355,6 +3355,9 @@
}, },
{ {
"__id__": 84 "__id__": 84
},
{
"__id__": 86
} }
], ],
"_active": true, "_active": true,
...@@ -3969,7 +3972,7 @@ ...@@ -3969,7 +3972,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "show", "_name": "scroll",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 69 "__id__": 69
...@@ -4027,7 +4030,7 @@ ...@@ -4027,7 +4030,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "3070sbqqVDcrs8oQuQY3AP" "_id": "85hVKyeY9GfJjP9ndVtOQh"
}, },
{ {
"__type__": "cc.AudioSource", "__type__": "cc.AudioSource",
...@@ -4037,6 +4040,86 @@ ...@@ -4037,6 +4040,86 @@
"__id__": 84 "__id__": 84
}, },
"_enabled": true, "_enabled": true,
"_clip": {
"__uuid__": "9c0a0fe2-0759-4968-a670-023cc4dffe26"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"playOnLoad": false,
"preload": false,
"_id": "1cwbPhicNHKbJ9aprzjptc"
},
{
"__type__": "cc.Node",
"_name": "show",
"_objFlags": 0,
"_parent": {
"__id__": 69
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 87
}
],
"_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": "3070sbqqVDcrs8oQuQY3AP"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
},
"_enabled": true,
"_clip": { "_clip": {
"__uuid__": "73c6427f-bac9-4ced-bfe8-1ea0628616eb" "__uuid__": "73c6427f-bac9-4ced-bfe8-1ea0628616eb"
}, },
...@@ -4111,9 +4194,6 @@ ...@@ -4111,9 +4194,6 @@
"__id__": 1 "__id__": 1
}, },
"_children": [ "_children": [
{
"__id__": 90
},
{ {
"__id__": 92 "__id__": 92
}, },
...@@ -4134,6 +4214,9 @@ ...@@ -4134,6 +4214,9 @@
}, },
{ {
"__id__": 104 "__id__": 104
},
{
"__id__": 106
} }
], ],
"_active": false, "_active": false,
...@@ -4191,13 +4274,13 @@ ...@@ -4191,13 +4274,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 91 "__id__": 93
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4253,7 +4336,7 @@ ...@@ -4253,7 +4336,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 90 "__id__": 92
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4283,13 +4366,13 @@ ...@@ -4283,13 +4366,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 93 "__id__": 95
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4345,7 +4428,7 @@ ...@@ -4345,7 +4428,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 92 "__id__": 94
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4375,13 +4458,13 @@ ...@@ -4375,13 +4458,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 95 "__id__": 97
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4437,7 +4520,7 @@ ...@@ -4437,7 +4520,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 96
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4467,13 +4550,13 @@ ...@@ -4467,13 +4550,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 97 "__id__": 99
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4529,7 +4612,7 @@ ...@@ -4529,7 +4612,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 96 "__id__": 98
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4559,13 +4642,13 @@ ...@@ -4559,13 +4642,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 99 "__id__": 101
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4621,7 +4704,7 @@ ...@@ -4621,7 +4704,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 98 "__id__": 100
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4651,13 +4734,13 @@ ...@@ -4651,13 +4734,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 101 "__id__": 103
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4713,7 +4796,7 @@ ...@@ -4713,7 +4796,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 100 "__id__": 102
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4743,13 +4826,13 @@ ...@@ -4743,13 +4826,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 103 "__id__": 105
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4805,7 +4888,7 @@ ...@@ -4805,7 +4888,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 102 "__id__": 104
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4835,13 +4918,13 @@ ...@@ -4835,13 +4918,13 @@
"_name": "sahua", "_name": "sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 89 "__id__": 91
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 105 "__id__": 107
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4897,7 +4980,7 @@ ...@@ -4897,7 +4980,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 104 "__id__": 106
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
......
...@@ -274,6 +274,7 @@ cc.Class({ ...@@ -274,6 +274,7 @@ cc.Class({
wrongClip: null, wrongClip: null,
starClip: null, starClip: null,
showClip: null, showClip: null,
scrollClip: null,
initAudioEffect() { initAudioEffect() {
this.clickClip = cc.find('Canvas/res/audio/click').getComponent(cc.AudioSource).clip; this.clickClip = cc.find('Canvas/res/audio/click').getComponent(cc.AudioSource).clip;
this.capClip = cc.find('Canvas/res/audio/cap').getComponent(cc.AudioSource).clip; this.capClip = cc.find('Canvas/res/audio/cap').getComponent(cc.AudioSource).clip;
...@@ -283,6 +284,7 @@ cc.Class({ ...@@ -283,6 +284,7 @@ cc.Class({
this.wrongClip = cc.find('Canvas/res/audio/wrong').getComponent(cc.AudioSource).clip; this.wrongClip = cc.find('Canvas/res/audio/wrong').getComponent(cc.AudioSource).clip;
this.starClip = cc.find('Canvas/res/audio/star').getComponent(cc.AudioSource).clip; this.starClip = cc.find('Canvas/res/audio/star').getComponent(cc.AudioSource).clip;
this.showClip = cc.find('Canvas/res/audio/show').getComponent(cc.AudioSource).clip; this.showClip = cc.find('Canvas/res/audio/show').getComponent(cc.AudioSource).clip;
this.scrollClip = cc.find('Canvas/res/audio/scroll').getComponent(cc.AudioSource).clip;
}, },
...@@ -489,7 +491,7 @@ cc.Class({ ...@@ -489,7 +491,7 @@ cc.Class({
console.log('this.posData: ', this.posData); console.log('this.posData: ', this.posData);
const key = 5//arr.length const key = arr.length
const posArr = this.posData[key.toString()]; const posArr = this.posData[key.toString()];
for (let i=0; i<key; i++) { for (let i=0; i<key; i++) {
const bottle = this.getBottle(arr[i]); const bottle = this.getBottle(arr[i]);
...@@ -683,6 +685,8 @@ cc.Class({ ...@@ -683,6 +685,8 @@ cc.Class({
this.changeLayer(); this.changeLayer();
}) })
.start(); .start();
playAudio(this.scrollClip);
} }
const moveTop = () => { const moveTop = () => {
......
No preview for this file type
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