Commit f8c59015 authored by liujiangnan's avatar liujiangnan

feat: 背景音乐

parent 89fd9997
{
"ver": "2.0.1",
"uuid": "e4dd8fcf-f653-4023-8e12-d907305726af",
"downloadMode": 0,
"duration": 107.6657,
"subMetas": {}
}
\ No newline at end of file
...@@ -5038,7 +5038,7 @@ ...@@ -5038,7 +5038,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "30s3Ven4ND7ojQnBfvRInz" "_id": "1fwIX0tNRC6KqY7q35rbGO"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5073,7 +5073,7 @@ ...@@ -5073,7 +5073,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "70fwoUwpBHCYgwHp8u4GSY" "_id": "309QnS1vNG46t5L+bJqgD6"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -5091,7 +5091,7 @@ ...@@ -5091,7 +5091,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "f5r6YHpopLa79NDR20X1nX" "_id": "a80n+rPIlKg6RbE3j0Tnlh"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -5246,7 +5246,7 @@ ...@@ -5246,7 +5246,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "89HDBUqbZKrocTwiAuzPNM" "_id": "40oABvo/JBE6DF3P3YeFC7"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5281,7 +5281,7 @@ ...@@ -5281,7 +5281,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "f6ToHUe4dBWbO0gDbHrbY4" "_id": "3dgDCybyZNCrQU7jDDi7bn"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -5299,7 +5299,7 @@ ...@@ -5299,7 +5299,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "912Q+8Q4ZLnL4FlTAZ0iWL" "_id": "1cToc/yU9LX68a/HSAQLwd"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -8589,7 +8589,7 @@ ...@@ -8589,7 +8589,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "dbGjL69xFKdIlL3YkLa5jP" "_id": "66UIt7DBpBQpVRn1JrMRa/"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -8624,7 +8624,7 @@ ...@@ -8624,7 +8624,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "0bZOj6xAhCjYxu0Td97eeo" "_id": "69GJsv0FNKVbzhX1oaw26M"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -8642,7 +8642,7 @@ ...@@ -8642,7 +8642,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "8cjAFiEWNAfqTbruDDvfGi" "_id": "e0nyxOBttB16Z+43xQ2Lhu"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -8797,7 +8797,7 @@ ...@@ -8797,7 +8797,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "3apyMg8IhBbY7yP2Ijuq9v" "_id": "32MB3IytZK0Jfp/NPbs8xW"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -8832,7 +8832,7 @@ ...@@ -8832,7 +8832,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "fbzTWrAH1IyLgqPbjUQKqq" "_id": "6b0C9mMv1L+Lul2GXsaO9V"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -8850,7 +8850,7 @@ ...@@ -8850,7 +8850,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "82yaQSKm9K3ordngb/B2P/" "_id": "1cplqPJ6xHp6vn/GW4PzBP"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -11943,7 +11943,7 @@ ...@@ -11943,7 +11943,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "7eWw1Zmt5OpqXtqe++2Ymv" "_id": "95Otu+6XRLH5D+kZ3KynNu"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -11978,7 +11978,7 @@ ...@@ -11978,7 +11978,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "35bcsUOBBLY5/jAHQx9Jtp" "_id": "01s5ITNK1NFpbLFgUXksdK"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -11996,7 +11996,7 @@ ...@@ -11996,7 +11996,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "451fFlKs9FR50nogmzi+0Y" "_id": "69988CMIdFmJszgp5iAAwI"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -12151,7 +12151,7 @@ ...@@ -12151,7 +12151,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "c87YnpfZpOXbA47rFSSVo6" "_id": "15Uog/2ZZFVqf61OrZ9Qee"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -12186,7 +12186,7 @@ ...@@ -12186,7 +12186,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "8c7u+9cmFLMJa0hruizMTL" "_id": "0e/iiDhx5O0ZsJ42P2uZnj"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -12204,7 +12204,7 @@ ...@@ -12204,7 +12204,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "0aNFI9bBtD8YCK/jHotjlF" "_id": "39EFWKWXtLvrXmDF3qgKcB"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -15494,7 +15494,7 @@ ...@@ -15494,7 +15494,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "a9GTKgye9Fh6Rt2kf506gP" "_id": "6fO0ve1yVGS7hz9M7pmdPs"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -15529,7 +15529,7 @@ ...@@ -15529,7 +15529,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "95GwuZIfdHiqVfem93RyX7" "_id": "ddZ3RTlZZDXKp7gBblP5Er"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -15547,7 +15547,7 @@ ...@@ -15547,7 +15547,7 @@
"a": 255 "a": 255
}, },
"_width": 7, "_width": 7,
"_id": "81SK3Cs3pPWaSZtdh9L9YQ" "_id": "188zUpKBVOM5ey3sVpO93g"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -15702,7 +15702,7 @@ ...@@ -15702,7 +15702,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "01QtXxVrdKSKMxRkLJQ0AA" "_id": "621DSfCY9C0KGWbk/O/CJT"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -15737,7 +15737,7 @@ ...@@ -15737,7 +15737,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "29R0XbYfdNr66DtYtvhfc6" "_id": "ed9pXAivlC1KCVRbz1E1+j"
}, },
{ {
"__type__": "cc.LabelOutline", "__type__": "cc.LabelOutline",
...@@ -15755,7 +15755,7 @@ ...@@ -15755,7 +15755,7 @@
"a": 255 "a": 255
}, },
"_width": 3, "_width": 3,
"_id": "11bh+2jkdA8JukzPRHhAwj" "_id": "ffjyO/m3RDw7diI7rPXAbe"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -15913,7 +15913,7 @@ ...@@ -15913,7 +15913,7 @@
"_enabled": true, "_enabled": true,
"horizontal": true, "horizontal": true,
"vertical": false, "vertical": false,
"inertia": true, "inertia": false,
"brake": 0.5, "brake": 0.5,
"elastic": false, "elastic": false,
"bounceDuration": 1, "bounceDuration": 1,
...@@ -17181,6 +17181,9 @@ ...@@ -17181,6 +17181,9 @@
"__id__": 2 "__id__": 2
}, },
"_enabled": true, "_enabled": true,
"bgMusic1": {
"__uuid__": "e4dd8fcf-f653-4023-8e12-d907305726af"
},
"_id": "eaTVUpqahPfZeO9+sUI7RP" "_id": "eaTVUpqahPfZeO9+sUI7RP"
} }
] ]
\ No newline at end of file
...@@ -5,6 +5,10 @@ const { ccclass, property } = cc._decorator; ...@@ -5,6 +5,10 @@ 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 });
} }
...@@ -74,6 +78,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -74,6 +78,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