Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FT_06
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
FT_06
Commits
8c1224c7
Commit
8c1224c7
authored
Nov 04, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 标题声音与题目声音重合问题;右下角按钮优先级问题
parent
92fac489
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
620 additions
and
616 deletions
+620
-616
FT_06.fire
play/assets/tmpGame/scene/FT_06.fire
+605
-605
FT_06.js
play/assets/tmpGame/scene/FT_06.js
+10
-9
utils.js
play/assets/tmpGame/script/utils.js
+5
-2
No files found.
play/assets/tmpGame/scene/FT_06.fire
View file @
8c1224c7
This diff is collapsed.
Click to expand it.
play/assets/tmpGame/scene/FT_06.js
View file @
8c1224c7
...
...
@@ -153,23 +153,24 @@ cc.Class({
async
showQuestion
()
{
this
.
showOptions
();
this
.
playIncomeAudio
();
await
this
.
questionBoardDown
();
this
.
questionBoardDown
();
await
this
.
playIncomeAudio
();
await
asyncDelay
(
1
);
this
.
playQuestionAudio
();
},
playIncomeAudio
()
{
asyncPlayEffectByUrl
(
this
.
data
.
tittleAudio
);
async
playIncomeAudio
()
{
a
wait
a
syncPlayEffectByUrl
(
this
.
data
.
tittleAudio
);
},
playQuestionAudio
()
{
async
playQuestionAudio
()
{
const
audioUrl
=
this
.
data
.
questionList
[
this
.
status
.
currentQuestionIdx
].
questionAudio
;
asyncPlayEffectByUrl
(
audioUrl
);
a
wait
a
syncPlayEffectByUrl
(
audioUrl
);
},
showOptions
()
{
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
const
optionNode
=
cc
.
find
(
`Canvas/optionNode_
${
i
}
`
);
const
optionNode
=
cc
.
find
(
`Canvas/
OptionPosListBase/
optionNode_
${
i
}
`
);
if
(
optionNode
)
{
optionNode
.
removeFromParent
();
}
...
...
@@ -178,7 +179,7 @@ cc.Class({
optionList
.
forEach
(
async
(
data
,
idx
)
=>
{
const
optionNode
=
cc
.
instantiate
(
cc
.
find
(
`OptionNodeBase_
${
optionList
.
length
}
`
));
optionNode
.
name
=
`optionNode_
${
idx
}
`
;
optionNode
.
parent
=
cc
.
find
(
'
Canvas
'
);
optionNode
.
parent
=
cc
.
find
(
'
Canvas
/OptionPosListBase
'
);
optionNode
.
addComponent
(
cc
.
Button
);
optionNode
.
canClick
=
true
;
optionNode
.
on
(
'
click
'
,
()
=>
{
...
...
@@ -267,7 +268,7 @@ cc.Class({
.
start
();
optionList
.
forEach
((
data
,
idx
)
=>
{
const
option
=
cc
.
find
(
`Canvas/optionNode_
${
idx
}
`
);
const
option
=
cc
.
find
(
`Canvas/
OptionPosListBase/
optionNode_
${
idx
}
`
);
option
.
canClick
=
false
;
if
(
option
!=
optionNode
)
{
...
...
play/assets/tmpGame/script/utils.js
View file @
8c1224c7
...
...
@@ -111,9 +111,12 @@ export async function asyncPlayDragonBoneAnimation(node, animationName, time = 1
export
async
function
asyncPlayEffectByUrl
(
url
,
loop
=
false
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
clip
)
=>
{
console
.
log
(
clip
);
cc
.
audioEngine
.
playEffect
(
clip
,
loop
);
setTimeout
(()
=>
{
resolve
();
},
clip
.
duration
*
1000
);
});
});
}
...
...
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