Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FT_12
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_12
Commits
0385b399
Commit
0385b399
authored
Dec 25, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
dc26b96b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Scene.js
play/assets/tmpGame/script/Scene.js
+6
-4
No files found.
play/assets/tmpGame/script/Scene.js
View file @
0385b399
...
@@ -134,6 +134,12 @@ cc.Class({
...
@@ -134,6 +134,12 @@ cc.Class({
loadEnd
()
{
loadEnd
()
{
GameData
.
questionIndex
=
0
;
GameData
.
questionIndex
=
0
;
this
.
questionList
=
[];
let
optionList
=
this
.
data
.
questionList
[
GameData
.
questionIndex
].
optionList
;
for
(
let
i
=
0
;
i
<
optionList
.
length
;
i
++
)
{
this
.
questionList
[
i
]
=
i
;
}
// this.questionList[0] = 0;
this
.
initData
();
this
.
initData
();
this
.
startGame
();
this
.
startGame
();
...
@@ -147,16 +153,13 @@ cc.Class({
...
@@ -147,16 +153,13 @@ cc.Class({
initData
()
{
initData
()
{
// 所有全局变量 默认都是null
// 所有全局变量 默认都是null
this
.
questionList
=
[];
GameData
.
audioCount
=
0
;
GameData
.
audioCount
=
0
;
this
.
nodeDict
.
nodButtons
.
zIndex
=
6
;
this
.
nodeDict
.
nodButtons
.
zIndex
=
6
;
let
optionList
=
this
.
data
.
questionList
[
GameData
.
questionIndex
].
optionList
;
let
optionList
=
this
.
data
.
questionList
[
GameData
.
questionIndex
].
optionList
;
this
.
optionList
=
[];
this
.
optionList
=
[];
for
(
let
i
=
0
;
i
<
optionList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
optionList
.
length
;
i
++
)
{
this
.
optionList
[
i
]
=
i
;
this
.
optionList
[
i
]
=
i
;
this
.
questionList
[
i
]
=
i
;
}
}
// this.questionList[0] = 0;
this
.
initAnswer
();
this
.
initAnswer
();
this
.
initTitle
();
this
.
initTitle
();
this
.
updateBtnStatus
();
this
.
updateBtnStatus
();
...
@@ -253,7 +256,6 @@ cc.Class({
...
@@ -253,7 +256,6 @@ cc.Class({
},
},
updateBtnStatus
()
{
updateBtnStatus
()
{
console
.
log
(
GameData
.
questionIndex
,
this
.
data
.
questionList
.
length
);
if
(
GameData
.
questionIndex
==
0
)
{
if
(
GameData
.
questionIndex
==
0
)
{
this
.
nodeDict
.
btnLast
.
getComponent
(
cc
.
Button
).
interactable
=
false
;
this
.
nodeDict
.
btnLast
.
getComponent
(
cc
.
Button
).
interactable
=
false
;
}
else
{
}
else
{
...
...
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