Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_MoTianLun
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_MoTianLun
Commits
6c0a8a2e
Commit
6c0a8a2e
authored
Jun 13, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 引导音频
parent
e6a58718
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
9 deletions
+130
-9
begin.mp3
assets/NJ_MoTianLun/audios/begin.mp3
+0
-0
begin.mp3.meta
assets/NJ_MoTianLun/audios/begin.mp3.meta
+7
-0
end.mp3
assets/NJ_MoTianLun/audios/end.mp3
+0
-0
end.mp3.meta
assets/NJ_MoTianLun/audios/end.mp3.meta
+7
-0
NJ_MoTianLun.fire
assets/NJ_MoTianLun/scene/NJ_MoTianLun.fire
+84
-5
NJ_MoTianLun.ts
assets/NJ_MoTianLun/scene/NJ_MoTianLun.ts
+32
-4
No files found.
assets/NJ_MoTianLun/audios/begin.mp3
0 → 100644
View file @
6c0a8a2e
File added
assets/NJ_MoTianLun/audios/begin.mp3.meta
0 → 100644
View file @
6c0a8a2e
{
"ver": "2.0.1",
"uuid": "fdb12df0-a2e0-486f-9f4e-4f3625897e81",
"downloadMode": 0,
"duration": 7.128,
"subMetas": {}
}
\ No newline at end of file
assets/NJ_MoTianLun/audios/end.mp3
0 → 100644
View file @
6c0a8a2e
File added
assets/NJ_MoTianLun/audios/end.mp3.meta
0 → 100644
View file @
6c0a8a2e
{
"ver": "2.0.1",
"uuid": "015739cc-c2c7-4d91-9a91-ca3a1d7e8d2a",
"downloadMode": 0,
"duration": 5.544,
"subMetas": {}
}
\ No newline at end of file
assets/NJ_MoTianLun/scene/NJ_MoTianLun.fire
View file @
6c0a8a2e
...
@@ -77,14 +77,14 @@
...
@@ -77,14 +77,14 @@
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
"__id__": 61
},
{
{
"__id__": 62
"__id__": 62
},
},
{
{
"__id__": 63
"__id__": 63
},
{
"__id__": 64
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -257,10 +257,10 @@
...
@@ -257,10 +257,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
59
"__id__":
60
},
},
{
{
"__id__": 6
0
"__id__": 6
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2647,6 +2647,9 @@
...
@@ -2647,6 +2647,9 @@
},
},
{
{
"__id__": 58
"__id__": 58
},
{
"__id__": 59
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2756,6 +2759,76 @@
...
@@ -2756,6 +2759,76 @@
"_originalHeight": 0,
"_originalHeight": 0,
"_id": "04QvGAAY5ENL6gWhL8dZzI"
"_id": "04QvGAAY5ENL6gWhL8dZzI"
},
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 56
},
"_id": "7dY8o8f9VMhZLqUKoGI2kb"
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
...
@@ -2870,6 +2943,12 @@
...
@@ -2870,6 +2943,12 @@
"bgMusic1": {
"bgMusic1": {
"__uuid__": "506e7563-c5f2-4dc5-b6da-5539d306cc5a"
"__uuid__": "506e7563-c5f2-4dc5-b6da-5539d306cc5a"
},
},
"monkyBegin": {
"__uuid__": "fdb12df0-a2e0-486f-9f4e-4f3625897e81"
},
"monkyWait": {
"__uuid__": "015739cc-c2c7-4d91-9a91-ca3a1d7e8d2a"
},
"_id": "eaTVUpqahPfZeO9+sUI7RP"
"_id": "eaTVUpqahPfZeO9+sUI7RP"
}
}
]
]
\ No newline at end of file
assets/NJ_MoTianLun/scene/NJ_MoTianLun.ts
View file @
6c0a8a2e
...
@@ -8,6 +8,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -8,6 +8,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
AudioClip
)
@
property
(
cc
.
AudioClip
)
bgMusic1
:
cc
.
AudioClip
=
null
;
bgMusic1
:
cc
.
AudioClip
=
null
;
@
property
(
cc
.
AudioClip
)
monkyBegin
:
cc
.
AudioClip
=
null
;
@
property
(
cc
.
AudioClip
)
monkyWait
:
cc
.
AudioClip
=
null
;
addPreloadImage
()
{
addPreloadImage
()
{
// this._imageResList.push({ url: this.data.pic_url });
// this._imageResList.push({ url: this.data.pic_url });
...
@@ -32,6 +36,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -32,6 +36,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
middleLayer
.
getComponent
(
'
middleLayer
'
).
showTips
(
tips
);
middleLayer
.
getComponent
(
'
middleLayer
'
).
showTips
(
tips
);
}
}
playId
=
null
;
async
onLoadEnd
()
{
async
onLoadEnd
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
...
@@ -49,14 +55,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -49,14 +55,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
return
;
return
;
}
}
const
btnReturn
=
cc
.
find
(
'
Canvas/bg/btn_return
'
);
this
.
initListener
();
buttonOnClick
(
btnReturn
,
()
=>
{
jumpToBundle
(
'
NJ_YouLeChang
'
);
});
// 播放背景音乐
// 播放背景音乐
cc
.
audioEngine
.
stopMusic
();
cc
.
audioEngine
.
stopMusic
();
cc
.
audioEngine
.
playMusic
(
this
.
bgMusic1
,
true
);
cc
.
audioEngine
.
playMusic
(
this
.
bgMusic1
,
true
);
cc
.
audioEngine
.
setMusicVolume
(
0.3
);
this
.
playId
=
cc
.
audioEngine
.
play
(
this
.
monkyBegin
,
null
,
1
);
cc
.
audioEngine
.
setFinishCallback
(
this
.
playId
,
()
=>
{
cc
.
audioEngine
.
setMusicVolume
(
1
);
})
if
(
!
middleLayer
)
{
if
(
!
middleLayer
)
{
return
;
return
;
...
@@ -122,6 +131,25 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -122,6 +131,25 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
initListener
()
{
const
btnReturn
=
cc
.
find
(
'
Canvas/bg/btn_return
'
);
buttonOnClick
(
btnReturn
,
()
=>
{
jumpToBundle
(
'
NJ_YouLeChang
'
);
});
const
btnMonkey
=
cc
.
find
(
'
Canvas/bg/bg_monkey
'
);
buttonOnClick
(
btnMonkey
,
()
=>
{
if
(
this
.
playId
)
{
cc
.
audioEngine
.
stop
(
this
.
playId
);
}
cc
.
audioEngine
.
setMusicVolume
(
0.3
);
this
.
playId
=
cc
.
audioEngine
.
play
(
this
.
monkyWait
,
null
,
1
);
cc
.
audioEngine
.
setFinishCallback
(
this
.
playId
,
()
=>
{
cc
.
audioEngine
.
setMusicVolume
(
1
);
})
});
}
protected
update
(
dt
:
number
):
void
{
protected
update
(
dt
:
number
):
void
{
}
}
}
}
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