Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
czh_test_001
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
czh_test_001
Commits
aa27271b
Commit
aa27271b
authored
Jul 12, 2022
by
chenzihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
e2bb69df
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
251 additions
and
182 deletions
+251
-182
czh_test_001.fire
assets/czh_test_001/scene/czh_test_001.fire
+218
-158
czh_test_001.ts
assets/czh_test_001/scene/czh_test_001.ts
+33
-24
No files found.
assets/czh_test_001/scene/czh_test_001.fire
View file @
aa27271b
This diff is collapsed.
Click to expand it.
assets/czh_test_001/scene/czh_test_001.ts
View file @
aa27271b
...
@@ -504,9 +504,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -504,9 +504,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
startTalking
()
{
startTalking
()
{
if
((
<
any
>
window
).
courseware
&&
(
<
any
>
window
).
courseware
.
stopTest
)
{
// if ((<any>window).courseware && (<any>window).courseware.stopTest) {
(
<
any
>
window
).
courseware
.
startTest
(
this
.
data
.
questions
[
this
.
level
-
1
].
text
);
// (<any>window).courseware.startTest(this.data.questions[this.level - 1].text);
}
// }
window
[
'
courseware
'
].
startTest
(
this
.
data
.
questions
[
this
.
level
-
1
].
text
);
}
}
stopTalking
()
{
stopTalking
()
{
...
@@ -516,27 +518,34 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -516,27 +518,34 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
moveOutOkBtn
();
this
.
moveOutOkBtn
();
this
.
showWhiteNode
();
this
.
showWhiteNode
();
let
timeout
=
false
window
[
'
courseware
'
].
stopTest
((
res
)
=>
{
if
((
<
any
>
window
).
courseware
&&
(
<
any
>
window
).
courseware
.
stopTest
)
{
if
(
res
.
result
&&
res
.
result
.
overall
>=
80
)
{
this
.
scheduleOnce
(()
=>
{
this
.
reviewSuccess
();
timeout
=
true
;
}
else
{
this
.
reviewFail
();
this
.
reviewFail
();
},
3
);
}
(
<
any
>
window
).
courseware
.
stopTest
((
res
)
=>
{
})
if
(
!
timeout
)
// let timeout = false
{
// if ((<any>window).courseware && (<any>window).courseware.stopTest) {
this
.
unscheduleAllCallbacks
();
// this.scheduleOnce(()=>{
res
=
JSON
.
parse
(
res
)
// timeout = true;
if
(
res
.
result
&&
res
.
result
.
overall
>=
80
)
{
// this.reviewFail();
this
.
reviewSuccess
();
// },3);
}
else
{
// (<any>window).courseware.stopTest((res) => {
this
.
reviewFail
();
// if(!timeout)
}
// {
}
// this.unscheduleAllCallbacks();
})
// res = JSON.parse(res)
}
else
{
// if (res.result && res.result.overall >= 80) {
this
.
reviewFail
();
// this.reviewSuccess();
}
// } else {
// this.reviewFail();
// }
// }
// })
// } else {
// this.reviewFail();
// }
}
}
playLocalAudio
(
audioName
:
string
){
playLocalAudio
(
audioName
:
string
){
...
...
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