Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_ShaMo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
NJ_ShaMo
Commits
f8c59015
Commit
f8c59015
authored
Sep 01, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 背景音乐
parent
89fd9997
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
25 deletions
+43
-25
bg_music.mp3
assets/NJ_ShaMo/audios/bg_music.mp3
+0
-0
bg_music.mp3.meta
assets/NJ_ShaMo/audios/bg_music.mp3.meta
+7
-0
NJ_ShaMo.fire
assets/NJ_ShaMo/scene/NJ_ShaMo.fire
+28
-25
NJ_ShaMo.ts
assets/NJ_ShaMo/scene/NJ_ShaMo.ts
+8
-0
No files found.
assets/NJ_ShaMo/audios/bg_music.mp3
0 → 100644
View file @
f8c59015
File added
assets/NJ_ShaMo/audios/bg_music.mp3.meta
0 → 100644
View file @
f8c59015
{
"ver": "2.0.1",
"uuid": "e4dd8fcf-f653-4023-8e12-d907305726af",
"downloadMode": 0,
"duration": 107.6657,
"subMetas": {}
}
\ No newline at end of file
assets/NJ_ShaMo/scene/NJ_ShaMo.fire
View file @
f8c59015
...
...
@@ -5038,7 +5038,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
30s3Ven4ND7ojQnBfvRInz
"
"_id": "
1fwIX0tNRC6KqY7q35rbGO
"
},
{
"__type__": "cc.Label",
...
...
@@ -5073,7 +5073,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
70fwoUwpBHCYgwHp8u4GSY
"
"_id": "
309QnS1vNG46t5L+bJqgD6
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -5091,7 +5091,7 @@
"a": 255
},
"_width": 3,
"_id": "
f5r6YHpopLa79NDR20X1nX
"
"_id": "
a80n+rPIlKg6RbE3j0Tnlh
"
},
{
"__type__": "cc.RichText",
...
...
@@ -5246,7 +5246,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
89HDBUqbZKrocTwiAuzPNM
"
"_id": "
40oABvo/JBE6DF3P3YeFC7
"
},
{
"__type__": "cc.Label",
...
...
@@ -5281,7 +5281,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
f6ToHUe4dBWbO0gDbHrbY4
"
"_id": "
3dgDCybyZNCrQU7jDDi7bn
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -5299,7 +5299,7 @@
"a": 255
},
"_width": 7,
"_id": "
912Q+8Q4ZLnL4FlTAZ0iWL
"
"_id": "
1cToc/yU9LX68a/HSAQLwd
"
},
{
"__type__": "cc.RichText",
...
...
@@ -8589,7 +8589,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
dbGjL69xFKdIlL3YkLa5jP
"
"_id": "
66UIt7DBpBQpVRn1JrMRa/
"
},
{
"__type__": "cc.Label",
...
...
@@ -8624,7 +8624,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
0bZOj6xAhCjYxu0Td97eeo
"
"_id": "
69GJsv0FNKVbzhX1oaw26M
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -8642,7 +8642,7 @@
"a": 255
},
"_width": 7,
"_id": "
8cjAFiEWNAfqTbruDDvfGi
"
"_id": "
e0nyxOBttB16Z+43xQ2Lhu
"
},
{
"__type__": "cc.RichText",
...
...
@@ -8797,7 +8797,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "3
apyMg8IhBbY7yP2Ijuq9v
"
"_id": "3
2MB3IytZK0Jfp/NPbs8xW
"
},
{
"__type__": "cc.Label",
...
...
@@ -8832,7 +8832,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
fbzTWrAH1IyLgqPbjUQKqq
"
"_id": "
6b0C9mMv1L+Lul2GXsaO9V
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -8850,7 +8850,7 @@
"a": 255
},
"_width": 3,
"_id": "
82yaQSKm9K3ordngb/B2P/
"
"_id": "
1cplqPJ6xHp6vn/GW4PzBP
"
},
{
"__type__": "cc.RichText",
...
...
@@ -11943,7 +11943,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
7eWw1Zmt5OpqXtqe++2Ymv
"
"_id": "
95Otu+6XRLH5D+kZ3KynNu
"
},
{
"__type__": "cc.Label",
...
...
@@ -11978,7 +11978,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
35bcsUOBBLY5/jAHQx9Jtp
"
"_id": "
01s5ITNK1NFpbLFgUXksdK
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -11996,7 +11996,7 @@
"a": 255
},
"_width": 7,
"_id": "
451fFlKs9FR50nogmzi+0Y
"
"_id": "
69988CMIdFmJszgp5iAAwI
"
},
{
"__type__": "cc.RichText",
...
...
@@ -12151,7 +12151,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
c87YnpfZpOXbA47rFSSVo6
"
"_id": "
15Uog/2ZZFVqf61OrZ9Qee
"
},
{
"__type__": "cc.Label",
...
...
@@ -12186,7 +12186,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
8c7u+9cmFLMJa0hruizMTL
"
"_id": "
0e/iiDhx5O0ZsJ42P2uZnj
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -12204,7 +12204,7 @@
"a": 255
},
"_width": 3,
"_id": "
0aNFI9bBtD8YCK/jHotjlF
"
"_id": "
39EFWKWXtLvrXmDF3qgKcB
"
},
{
"__type__": "cc.RichText",
...
...
@@ -15494,7 +15494,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
a9GTKgye9Fh6Rt2kf506gP
"
"_id": "
6fO0ve1yVGS7hz9M7pmdPs
"
},
{
"__type__": "cc.Label",
...
...
@@ -15529,7 +15529,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
95GwuZIfdHiqVfem93RyX7
"
"_id": "
ddZ3RTlZZDXKp7gBblP5Er
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -15547,7 +15547,7 @@
"a": 255
},
"_width": 7,
"_id": "
81SK3Cs3pPWaSZtdh9L9YQ
"
"_id": "
188zUpKBVOM5ey3sVpO93g
"
},
{
"__type__": "cc.RichText",
...
...
@@ -15702,7 +15702,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "
01QtXxVrdKSKMxRkLJQ0AA
"
"_id": "
621DSfCY9C0KGWbk/O/CJT
"
},
{
"__type__": "cc.Label",
...
...
@@ -15737,7 +15737,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "
29R0XbYfdNr66DtYtvhfc6
"
"_id": "
ed9pXAivlC1KCVRbz1E1+j
"
},
{
"__type__": "cc.LabelOutline",
...
...
@@ -15755,7 +15755,7 @@
"a": 255
},
"_width": 3,
"_id": "
11bh+2jkdA8JukzPRHhAwj
"
"_id": "
ffjyO/m3RDw7diI7rPXAbe
"
},
{
"__type__": "cc.RichText",
...
...
@@ -15913,7 +15913,7 @@
"_enabled": true,
"horizontal": true,
"vertical": false,
"inertia":
tru
e,
"inertia":
fals
e,
"brake": 0.5,
"elastic": false,
"bounceDuration": 1,
...
...
@@ -17181,6 +17181,9 @@
"__id__": 2
},
"_enabled": true,
"bgMusic1": {
"__uuid__": "e4dd8fcf-f653-4023-8e12-d907305726af"
},
"_id": "eaTVUpqahPfZeO9+sUI7RP"
}
]
\ No newline at end of file
assets/NJ_ShaMo/scene/NJ_ShaMo.ts
View file @
f8c59015
...
...
@@ -5,6 +5,10 @@ const { ccclass, property } = cc._decorator;
@
ccclass
export
default
class
SceneComponent
extends
MyCocosSceneComponent
{
@
property
(
cc
.
AudioClip
)
bgMusic1
:
cc
.
AudioClip
=
null
;
addPreloadImage
()
{
// this._imageResList.push({ url: this.data.pic_url });
}
...
...
@@ -74,6 +78,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
await
this
.
initData
();
await
this
.
initView
();
this
.
initListener
();
// 播放背景音乐
cc
.
audioEngine
.
stopMusic
();
cc
.
audioEngine
.
playMusic
(
this
.
bgMusic1
,
true
);
}
async
initView
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment