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
93e104fc
Commit
93e104fc
authored
Nov 05, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 进场音效播放问题;按钮不可用状态问题;
parent
8c1224c7
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
657 additions
and
155 deletions
+657
-155
package-lock.json
form/package-lock.json
+641
-146
package.json
form/package.json
+1
-1
FT_06.js
play/assets/tmpGame/scene/FT_06.js
+11
-6
utils.js
play/assets/tmpGame/script/utils.js
+4
-2
No files found.
form/package-lock.json
View file @
93e104fc
This diff is collapsed.
Click to expand it.
form/package.json
View file @
93e104fc
...
@@ -56,4 +56,4 @@
...
@@ -56,4 +56,4 @@
"tslint"
:
"~5.18.0"
,
"tslint"
:
"~5.18.0"
,
"typescript"
:
"~3.7.5"
"typescript"
:
"~3.7.5"
}
}
}
}
\ No newline at end of file
play/assets/tmpGame/scene/FT_06.js
View file @
93e104fc
...
@@ -97,7 +97,7 @@ cc.Class({
...
@@ -97,7 +97,7 @@ cc.Class({
this
.
_onLoadFinishFunc
();
this
.
_onLoadFinishFunc
();
}
}
this
.
showQuestion
();
this
.
showQuestion
(
true
);
},
},
initStatus
()
{
initStatus
()
{
...
@@ -120,22 +120,25 @@ cc.Class({
...
@@ -120,22 +120,25 @@ cc.Class({
initListeners
()
{
initListeners
()
{
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnBefore
'
),
()
=>
{
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnBefore
'
),
()
=>
{
if
(
this
.
status
.
currentQuestionIdx
<=
0
)
{
if
(
this
.
status
.
currentQuestionIdx
<=
0
)
{
return
;
return
false
;
}
}
this
.
status
.
currentQuestionIdx
--
;
this
.
status
.
currentQuestionIdx
--
;
this
.
showQuestion
();
this
.
showQuestion
();
return
true
;
});
});
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnNext
'
),
()
=>
{
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnNext
'
),
()
=>
{
if
(
this
.
status
.
currentQuestionIdx
+
1
>=
this
.
data
.
questionList
.
length
)
{
if
(
this
.
status
.
currentQuestionIdx
+
1
>=
this
.
data
.
questionList
.
length
)
{
return
;
return
false
;
}
}
this
.
status
.
currentQuestionIdx
++
;
this
.
status
.
currentQuestionIdx
++
;
this
.
showQuestion
();
this
.
showQuestion
();
return
true
;
});
});
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnRefresh
'
),
()
=>
{
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnRefresh
'
),
()
=>
{
this
.
showQuestion
();
this
.
showQuestion
();
return
true
;
});
});
cc
.
find
(
'
Canvas/bgFrount/leef/TittleLabelNode
'
).
on
(
'
click
'
,
()
=>
{
cc
.
find
(
'
Canvas/bgFrount/leef/TittleLabelNode
'
).
on
(
'
click
'
,
()
=>
{
...
@@ -151,11 +154,13 @@ cc.Class({
...
@@ -151,11 +154,13 @@ cc.Class({
},
},
async
showQuestion
()
{
async
showQuestion
(
isFirstIncome
=
false
)
{
this
.
showOptions
();
this
.
showOptions
();
this
.
questionBoardDown
();
this
.
questionBoardDown
();
await
this
.
playIncomeAudio
();
if
(
isFirstIncome
)
{
await
asyncDelay
(
1
);
await
this
.
playIncomeAudio
();
await
asyncDelay
(
1
);
}
this
.
playQuestionAudio
();
this
.
playQuestionAudio
();
},
},
...
...
play/assets/tmpGame/script/utils.js
View file @
93e104fc
...
@@ -242,8 +242,10 @@ export function addButtonListener(btnNode, func) {
...
@@ -242,8 +242,10 @@ export function addButtonListener(btnNode, func) {
}
}
btnNode
.
canNotClick
=
true
;
btnNode
.
canNotClick
=
true
;
playEffect
(
'
按钮
'
);
playEffect
(
'
按钮
'
);
await
func
(
btn
);
const
result
=
await
func
(
btn
);
await
jelly
(
btnNode
);
if
(
result
)
{
await
jelly
(
btnNode
);
}
btnNode
.
canNotClick
=
false
;
btnNode
.
canNotClick
=
false
;
});
});
}
}
...
...
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