Commit aa97f2b1 authored by liujiangnan's avatar liujiangnan

feat: 背景音乐

parent 77bba749
{
"ver": "2.0.1",
"uuid": "482f1898-b351-4711-af8f-f1939ade08e9",
"downloadMode": 0,
"duration": 90.3614,
"subMetas": {}
}
\ No newline at end of file
...@@ -5731,7 +5731,7 @@ ...@@ -5731,7 +5731,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "11kl7zJqtL0aw3561lkQDj" "_id": "fbSnGuny5A/Jags2lrob5y"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5766,7 +5766,7 @@ ...@@ -5766,7 +5766,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "6eBrBR09tDSbIje4fhJxWd" "_id": "817fkUh1tElKMFTCBC6SDP"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -5784,7 +5784,7 @@ ...@@ -5784,7 +5784,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "77RJhu4kxMvovsu8TX8cn7" "_id": "dagoEHZ+5NVIUj9X6vj84H"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -5939,7 +5939,7 @@ ...@@ -5939,7 +5939,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "e6KVPh/0pFkqhHofbPq7iD" "_id": "18b3Sp6/1OXadsLmq1RnBH"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5974,7 +5974,7 @@ ...@@ -5974,7 +5974,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "2bJZMrhO1KNoUWyrCC++Cy" "_id": "2c0ezXGxJKoY5+wz7GOK6Q"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -5992,7 +5992,7 @@ ...@@ -5992,7 +5992,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "63e1juF3tKs6x2Nazy6ABm" "_id": "74xX4TN4lIBKvlwE4MaVgd"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -9085,7 +9085,7 @@ ...@@ -9085,7 +9085,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "bfXQnkaqRLaqnx2bgI/ywo" "_id": "eeC++4wWJPia6vDlvDEXiU"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -9120,7 +9120,7 @@ ...@@ -9120,7 +9120,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "22nr/m/ulA65FhHdCR2h39" "_id": "5832U8zKJOS4MgUkuNrh6x"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -9138,7 +9138,7 @@ ...@@ -9138,7 +9138,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "e4ItHG5L1FkYSLCgmEuP3d" "_id": "ecFku5HXlDOYNc4Wy8L+fH"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -9293,7 +9293,7 @@ ...@@ -9293,7 +9293,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "9bPRCFH8RCRoe63cZVY37t" "_id": "dfBjE6aj9NuZBth0n077fr"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -9328,7 +9328,7 @@ ...@@ -9328,7 +9328,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "3cmuy9vyBLJ5sfNibRiJBw" "_id": "71hiZ2bvNAOokkL92r2yL1"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -9346,7 +9346,7 @@ ...@@ -9346,7 +9346,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "4fZfKBwwZEO401lPU5A+GE" "_id": "f7b7d2JbZAprJi1MQmDfyh"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -12439,7 +12439,7 @@ ...@@ -12439,7 +12439,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "58wo0pmFpNM4VB+2XB2Epx" "_id": "00OE8FOmBEbaVvypI80YCt"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -12474,7 +12474,7 @@ ...@@ -12474,7 +12474,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "e1zCdn+jxKK7pNe7qKlfEZ" "_id": "0cFgF4JpBNu6KozyTBUg0h"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -12492,7 +12492,7 @@ ...@@ -12492,7 +12492,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "81Z9kRE+1IFYuRM/HTVTGU" "_id": "81NoB0GRFJkZsXBl7sYPkq"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -12647,7 +12647,7 @@ ...@@ -12647,7 +12647,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "8523t8ThJPTZzSOfZcGn0A" "_id": "b9XBGJRYpDJIZUuVZsxKSH"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -12682,7 +12682,7 @@ ...@@ -12682,7 +12682,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "c6AG/eM8xEV74rFwil/5Ki" "_id": "85/jPbtudBAqqcLPFiAXMO"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -12700,7 +12700,7 @@ ...@@ -12700,7 +12700,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "24wxESo6tGR5m73VgzbgiR" "_id": "adk7UodU5BlYBJSN8rTlrj"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -15990,7 +15990,7 @@ ...@@ -15990,7 +15990,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "1bdEoFsCtCq4xWkeP/I+O9" "_id": "e6+C3eXD5NbZhnWKgMKRmb"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -16025,7 +16025,7 @@ ...@@ -16025,7 +16025,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "fdnUJM5DJH6ZZmEryPty45" "_id": "4dZY0ZEQdNFYdL4I6PDhko"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -16043,7 +16043,7 @@ ...@@ -16043,7 +16043,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "5eR17NmKdOfr73dcY3rst3" "_id": "ba8awCL8JGNKhAoi+KGadM"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -16198,7 +16198,7 @@ ...@@ -16198,7 +16198,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "cfwIR5aV9Dr4b6aevHp03i" "_id": "deAERQFqNIHruoVOBiGaEY"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -16233,7 +16233,7 @@ ...@@ -16233,7 +16233,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "d3/QhQS5lNUb3ssCq+Afh9" "_id": "c7dIrnE7lLIpp1FqSyP1Cu"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -16251,7 +16251,7 @@ ...@@ -16251,7 +16251,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "e4WgeMDp9Jr6Tzj01AFjTf" "_id": "25PQY0eOhP47yF1HnPOq45"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -17673,6 +17673,9 @@ ...@@ -17673,6 +17673,9 @@
"__id__": 2 "__id__": 2
}, },
"_enabled": true, "_enabled": true,
"bgMusic1": {
"__uuid__": "482f1898-b351-4711-af8f-f1939ade08e9"
},
"_id": "afzXL6FE5CT5Yu6cclDaAT" "_id": "afzXL6FE5CT5Yu6cclDaAT"
} }
] ]
\ No newline at end of file
...@@ -6,6 +6,9 @@ const { ccclass, property } = cc._decorator; ...@@ -6,6 +6,9 @@ const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class SceneComponent extends MyCocosSceneComponent { export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.AudioClip)
bgMusic1: cc.AudioClip = null;
addPreloadImage() { addPreloadImage() {
// this._imageResList.push({ url: this.data.pic_url }); // this._imageResList.push({ url: this.data.pic_url });
} }
...@@ -76,6 +79,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -76,6 +79,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
await this.initData(); await this.initData();
await this.initView(); await this.initView();
this.initListener(); this.initListener();
// 播放背景音乐
cc.audioEngine.stopMusic();
cc.audioEngine.playMusic(this.bgMusic1, true);
} }
async initView() { async initView() {
......
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