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
9ce7f7ea
Commit
9ce7f7ea
authored
Nov 05, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 右下角按钮状态改变
parent
93e104fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
0 deletions
+73
-0
FT_06.js
play/assets/tmpGame/scene/FT_06.js
+18
-0
defaultData.js
play/assets/tmpGame/script/defaultData.js
+55
-0
No files found.
play/assets/tmpGame/scene/FT_06.js
View file @
9ce7f7ea
...
...
@@ -91,6 +91,8 @@ cc.Class({
this
.
initListeners
();
this
.
updateButtons
();
this
.
updateBgSize
();
if
(
this
.
_onLoadFinishFunc
&&
typeof
(
this
.
_onLoadFinishFunc
)
==
'
function
'
)
{
...
...
@@ -117,6 +119,20 @@ cc.Class({
optionPosListBase
.
scaleY
=
canvas
.
height
/
optionPosListBase
.
height
;
},
updateButtons
()
{
const
btnBefore
=
cc
.
find
(
'
Canvas/BtnNode/BtnBefore
'
);
btnBefore
.
color
=
cc
.
color
(
255
,
255
,
255
);
if
(
this
.
status
.
currentQuestionIdx
<=
0
)
{
btnBefore
.
color
=
cc
.
color
(
150
,
150
,
150
);
}
const
btnNext
=
cc
.
find
(
'
Canvas/BtnNode/BtnNext
'
);
btnNext
.
color
=
cc
.
color
(
255
,
255
,
255
);
if
(
this
.
status
.
currentQuestionIdx
+
1
>=
this
.
data
.
questionList
.
length
)
{
btnNext
.
color
=
cc
.
color
(
150
,
150
,
150
);
}
},
initListeners
()
{
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnBefore
'
),
()
=>
{
if
(
this
.
status
.
currentQuestionIdx
<=
0
)
{
...
...
@@ -124,6 +140,7 @@ cc.Class({
}
this
.
status
.
currentQuestionIdx
--
;
this
.
showQuestion
();
this
.
updateButtons
();
return
true
;
});
...
...
@@ -133,6 +150,7 @@ cc.Class({
}
this
.
status
.
currentQuestionIdx
++
;
this
.
showQuestion
();
this
.
updateButtons
();
return
true
;
});
...
...
play/assets/tmpGame/script/defaultData.js
View file @
9ce7f7ea
...
...
@@ -56,5 +56,60 @@ module.exports = {
},
"
optionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b75df34ef55bd1c6e3a799f1dac87fec.mp3
"
}]
},
{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/90e313405ba454880e75ff6958ea05c0.mp3
"
,
"
questionTxt
"
:
"
12as s df sdfab
"
,
"
rightOptionIdx
"
:
1
,
"
optionList
"
:
[{
"
optionDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/a86e5c9e40e818879bb96c6d566e2c47.json
"
,
"
name
"
:
"
dc_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/c7a47999c11c158e717c49861d39c3fa.json
"
,
"
name
"
:
"
dc_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/4ca3ab5ea9ce40cfebee20952e22e76e.png
"
,
"
name
"
:
"
dc_tex.png
"
}
},
"
optionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/8ba49890c74b8c68b1da4556ac8c1dda.mp3
"
},
{
"
optionDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/703a41d6c7afe6fe653014d585ef0d58.json
"
,
"
name
"
:
"
d1_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/02bbebdc4a9f4a35d9ec285f61fca19c.json
"
,
"
name
"
:
"
d1_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/ba2041fb4f69c37be52b76f5fb274c09.png
"
,
"
name
"
:
"
d1_tex.png
"
}
},
"
optionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/8ba49890c74b8c68b1da4556ac8c1dda.mp3
"
},
{
"
optionDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/2cd8f3daa6534efd6f7ca3b138581e5c.json
"
,
"
name
"
:
"
ant_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/b2d30dbdfe2ec050af5651f8f609b56d.json
"
,
"
name
"
:
"
ant_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/ad816ff2b5823868bf87a5c05bc949a1.png
"
,
"
name
"
:
"
ant_tex.png
"
}
},
"
optionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b75df34ef55bd1c6e3a799f1dac87fec.mp3
"
}]
}]
}
\ No newline at end of file
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