Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_NongChang
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_NongChang
Commits
aa97f2b1
Commit
aa97f2b1
authored
Sep 01, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 背景音乐
parent
77bba749
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
24 deletions
+41
-24
bg_music.mp3
assets/NJ_NongChang/audios/bg_music.mp3
+0
-0
bg_music.mp3.meta
assets/NJ_NongChang/audios/bg_music.mp3.meta
+7
-0
NJ_NongChang.fire
assets/NJ_NongChang/scene/NJ_NongChang.fire
+27
-24
NJ_NongChang.ts
assets/NJ_NongChang/scene/NJ_NongChang.ts
+7
-0
No files found.
assets/NJ_NongChang/audios/bg_music.mp3
0 → 100644
View file @
aa97f2b1
File added
assets/NJ_NongChang/audios/bg_music.mp3.meta
0 → 100644
View file @
aa97f2b1
{
"ver": "2.0.1",
"uuid": "482f1898-b351-4711-af8f-f1939ade08e9",
"downloadMode": 0,
"duration": 90.3614,
"subMetas": {}
}
\ No newline at end of file
assets/NJ_NongChang/scene/NJ_NongChang.fire
View file @
aa97f2b1
...
@@ -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": "2
bJZMrhO1KNoUWyrCC++Cy
"
"_id": "2
c0ezXGxJKoY5+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": "e
4ItHG5L1FkYSLCgmEuP3d
"
"_id": "e
cFku5HXlDOYNc4Wy8L+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": "81
Z9kRE+1IFYuRM/HTVTGU
"
"_id": "81
NoB0GRFJkZsXBl7sYPkq
"
},
},
{
{
"__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
assets/NJ_NongChang/scene/NJ_NongChang.ts
View file @
aa97f2b1
...
@@ -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
()
{
...
...
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