Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbox_FT_11
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
Sbox_FT_11
Commits
effdea78
Commit
effdea78
authored
Dec 14, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
title按钮 bug
parent
2930ff1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Scene.js
play/assets/tmpGame/script/Scene.js
+5
-3
No files found.
play/assets/tmpGame/script/Scene.js
View file @
effdea78
...
@@ -193,7 +193,7 @@ cc.Class({
...
@@ -193,7 +193,7 @@ cc.Class({
})
})
},
},
playAudioQuestion
()
{
playAudioQuestion
(
isBtn
)
{
GameData
.
isAudio
=
true
;
GameData
.
isAudio
=
true
;
let
url
=
this
.
data
.
questionList
[
GameData
.
questionIndex
].
questionAudio
;
let
url
=
this
.
data
.
questionList
[
GameData
.
questionIndex
].
questionAudio
;
// url = 'http://127.0.0.1/iamflying.mp3';
// url = 'http://127.0.0.1/iamflying.mp3';
...
@@ -206,7 +206,9 @@ cc.Class({
...
@@ -206,7 +206,9 @@ cc.Class({
let
id
=
cc
.
audioEngine
.
play
(
clip
,
false
,
1
);
let
id
=
cc
.
audioEngine
.
play
(
clip
,
false
,
1
);
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
GameData
.
isAudio
=
false
;
GameData
.
isAudio
=
false
;
if
(
!
isBtn
){
this
.
showRandomQuestion
();
this
.
showRandomQuestion
();
}
})
})
});
});
},
},
...
@@ -332,7 +334,7 @@ cc.Class({
...
@@ -332,7 +334,7 @@ cc.Class({
buttonListener
(
button
)
{
buttonListener
(
button
)
{
if
(
button
.
node
.
name
==
'
btnTitle
'
)
{
if
(
button
.
node
.
name
==
'
btnTitle
'
)
{
if
(
!
GameData
.
isAudio
)
{
if
(
!
GameData
.
isAudio
)
{
this
.
playAudioQuestion
();
this
.
playAudioQuestion
(
true
);
}
}
}
else
if
(
button
.
node
.
name
==
'
btnLast
'
)
{
}
else
if
(
button
.
node
.
name
==
'
btnLast
'
)
{
this
.
onTurnLast
();
this
.
onTurnLast
();
...
...
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