Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
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
DG_FAF
Commits
95a1c730
Commit
95a1c730
authored
Mar 07, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据迪格反馈修改
1. 添加完成音频 2. 修改对错号颜色
parent
71e821d8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
129 additions
and
14 deletions
+129
-14
finish.mp3
assets/DG_FAF/audios/finish.mp3
+0
-0
finish.mp3.meta
assets/DG_FAF/audios/finish.mp3.meta
+7
-0
DG_FAF.fire
assets/DG_FAF/scene/DG_FAF.fire
+93
-9
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+18
-5
util_DG_FAF.ts
assets/DG_FAF/script/util_DG_FAF.ts
+11
-0
icon_answer_right.png
assets/DG_FAF/textures/icon_answer_right.png
+0
-0
icon_answer_wrong.png
assets/DG_FAF/textures/icon_answer_wrong.png
+0
-0
No files found.
assets/DG_FAF/audios/finish.mp3
0 → 100644
View file @
95a1c730
File added
assets/DG_FAF/audios/finish.mp3.meta
0 → 100644
View file @
95a1c730
{
"ver": "2.0.1",
"uuid": "9268b9e5-2c1d-40cd-823c-a946499da62f",
"downloadMode": 0,
"duration": 2.319563,
"subMetas": {}
}
\ No newline at end of file
assets/DG_FAF/scene/DG_FAF.fire
View file @
95a1c730
...
...
@@ -105,19 +105,19 @@
"__id__": 732
},
{
"__id__": 76
2
"__id__": 76
4
}
],
"_active": true,
"_components": [
{
"__id__": 76
5
"__id__": 76
7
},
{
"__id__": 76
6
"__id__": 76
8
},
{
"__id__": 76
7
"__id__": 76
9
}
],
"_prefab": null,
...
...
@@ -29173,6 +29173,9 @@
"_children": [
{
"__id__": 760
},
{
"__id__": 762
}
],
"_active": true,
...
...
@@ -29306,6 +29309,87 @@
"preload": false,
"_id": "dey05oKrBIspvsDa6pOIQz"
},
{
"__type__": "cc.Node",
"_name": "finish",
"_objFlags": 0,
"_parent": {
"__id__": 759
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 763
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8ebhwyzolLg4uGwPeJaYyS"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 762
},
"_enabled": true,
"_clip": {
"__uuid__": "9268b9e5-2c1d-40cd-823c-a946499da62f"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "e5i4eqxI1NYK3E5PwO9i4/"
},
{
"__type__": "cc.Node",
"_name": "Speaker",
...
...
@@ -29317,10 +29401,10 @@
"_active": false,
"_components": [
{
"__id__": 76
3
"__id__": 76
5
},
{
"__id__": 76
4
"__id__": 76
6
}
],
"_prefab": null,
...
...
@@ -29376,7 +29460,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
2
"__id__": 76
4
},
"_enabled": true,
"_defaultClip": {
...
...
@@ -29395,7 +29479,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
2
"__id__": 76
4
},
"_enabled": true,
"_materials": [
...
...
@@ -29484,7 +29568,7 @@
"__id__": 100
},
"aniSpeaker": {
"__id__": 76
2
"__id__": 76
4
},
"_id": "eaTVUpqahPfZeO9+sUI7RP"
}
...
...
assets/DG_FAF/scene/DG_FAF.ts
View file @
95a1c730
...
...
@@ -4,7 +4,7 @@ import {
loadImageByUrl
,
asyncLoadRemote
,
getSprNode
,
localPosTolocalPos
playLocalAudio
}
from
"
../script/util_DG_FAF
"
;
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent_DG_FAF
"
;
...
...
@@ -43,13 +43,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage
()
{
// TODO 根据自己的配置预加载图片资源
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url
});
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url_2
});
if
(
this
.
data
.
bgItem
.
url
)
{
this
.
_imageResList
.
push
({
url
:
this
.
data
.
bgItem
.
url
});
}
if
(
this
.
data
.
footer_image_url
)
{
this
.
_imageResList
.
push
({
url
:
this
.
data
.
footer_image_url
});
}
if
(
this
.
data
.
header_image_url
)
{
this
.
_imageResList
.
push
({
url
:
this
.
data
.
header_image_url
});
}
}
addPreloadAudio
()
{
// TODO 根据自己的配置预加载音频资源
this
.
_audioResList
.
push
({
url
:
this
.
data
.
audio_url
});
this
.
data
.
hotZoneConfigArr
.
forEach
(
config
=>
{
if
(
config
.
hotZoneType
==
AUDIO_PLAY
&&
config
.
audio_url
)
{
this
.
_audioResList
.
push
({
url
:
config
.
audio_url
});
}
});
}
addPreloadAnima
()
{}
...
...
@@ -342,12 +353,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
scoreShowContainer
.
opacity
=
0
;
this
.
scoreShowContainer
.
active
=
true
;
cc
.
tween
(
this
.
scoreShowContainer
).
to
(
0.1
,
{
opacity
:
255
}).
call
(()
=>
{
}).
call
(
async
()
=>
{
const
dragonDisplay
=
animationNode
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
dragonDisplay
.
playAnimation
(
'
newAnimation
'
,
1
);
this
.
showCloseBtn
();
playLocalAudio
(
"
finish
"
);
}).
start
()
}
...
...
assets/DG_FAF/script/util_DG_FAF.ts
View file @
95a1c730
...
...
@@ -200,6 +200,17 @@ export function playAudio(audioClip, cb = null) {
}
}
export
function
playLocalAudio
(
audioName
,
callback
=
null
)
{
const
audio
=
cc
.
find
(
`Canvas/res/audio/
${
audioName
}
`
).
getComponent
(
cc
.
AudioSource
);
return
new
Promise
((
resolve
,
reject
)
=>
{
const
id
=
cc
.
audioEngine
.
playEffect
(
audio
.
clip
,
false
);
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
resolve
(
id
);
callback
&&
callback
();
});
})
}
export
async
function
asyncDelay
(
time
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
...
...
assets/DG_FAF/textures/icon_answer_right.png
View replaced file @
71e821d8
View file @
95a1c730
1.61 KB
|
W:
|
H:
2.46 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/DG_FAF/textures/icon_answer_wrong.png
View replaced file @
71e821d8
View file @
95a1c730
1.5 KB
|
W:
|
H:
2.33 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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