Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM5-9
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
YM5-9
Commits
db3edc2e
Commit
db3edc2e
authored
Feb 05, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix
parent
96334524
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
play.component.ts
src/app/play/play.component.ts
+19
-0
No files found.
src/app/play/play.component.ts
View file @
db3edc2e
...
@@ -493,6 +493,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -493,6 +493,9 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
nextQuestion
)
{
if
(
nextQuestion
)
{
pannel
.
currentQuestionIndex
++
;
pannel
.
currentQuestionIndex
++
;
}
}
if
(
this
.
g_formData
.
dataArray
.
length
==
pannel
.
currentQuestionInde
+
1
)
{
return
;
}
this
.
g_cartoon
.
playAudio
(
"
wtcx
"
)
this
.
g_cartoon
.
playAudio
(
"
wtcx
"
)
let
textString
=
""
let
textString
=
""
let
startX
=
42
*
this
.
g_mapScale
;
let
startX
=
42
*
this
.
g_mapScale
;
...
@@ -665,12 +668,18 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -665,12 +668,18 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
const
scrollPannel
=
this
.
g_cartoon
.
getCartoonElement
(
"
scroll-pannel
"
)
const
scrollPannel
=
this
.
g_cartoon
.
getCartoonElement
(
"
scroll-pannel
"
)
btnQuestion
.
canClick
=
true
;
this
.
subscribeMapDownEvent
(
btnQuestion
.
id
,
()
=>
{
this
.
subscribeMapDownEvent
(
btnQuestion
.
id
,
()
=>
{
if
(
!
btnQuestion
.
canClick
)
{
this
.
g_enableMapDown
=
true
;
return
}
let
text
=
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
questionText
?
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
questionText
:
""
let
text
=
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
questionText
?
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
questionText
:
""
let
textArray
=
text
.
split
(
/
\n
/
)
let
textArray
=
text
.
split
(
/
\n
/
)
let
lastIndex
=
textArray
.
length
;
let
lastIndex
=
textArray
.
length
;
this
.
g_cartoon
.
playAudio
(
"
click_btn
"
)
this
.
g_cartoon
.
playAudio
(
"
click_btn
"
)
jelly
(
btnQuestion
.
ref
)
jelly
(
btnQuestion
.
ref
)
btnQuestion
.
canClick
=
false
;
textArray
.
forEach
((
item
,
index
)
=>
{
textArray
.
forEach
((
item
,
index
)
=>
{
if
(
index
==
0
)
{
if
(
index
==
0
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -679,6 +688,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -679,6 +688,7 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
btnQuestion
.
hide
(()
=>
{
btnQuestion
.
hide
(()
=>
{
btnAnswer
.
show
(()
=>
{
btnAnswer
.
show
(()
=>
{
btnQuestion
.
canClick
=
true
;
this
.
g_enableMapDown
=
true
;
this
.
g_enableMapDown
=
true
;
})
})
})
})
...
@@ -692,6 +702,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -692,6 +702,7 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
btnQuestion
.
hide
(()
=>
{
btnQuestion
.
hide
(()
=>
{
btnAnswer
.
show
(()
=>
{
btnAnswer
.
show
(()
=>
{
btnQuestion
.
canClick
=
true
;
this
.
g_enableMapDown
=
true
;
this
.
g_enableMapDown
=
true
;
})
})
})
})
...
@@ -702,12 +713,18 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -702,12 +713,18 @@ export class PlayComponent implements OnInit, OnDestroy {
})
})
},
100
)
},
100
)
btnAnswer
.
canClick
=
true
;
this
.
subscribeMapDownEvent
(
btnAnswer
.
id
,
()
=>
{
this
.
subscribeMapDownEvent
(
btnAnswer
.
id
,
()
=>
{
if
(
!
btnAnswer
.
canClick
)
{
this
.
g_enableMapDown
=
true
;
return
}
let
text
=
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
answerText
?
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
answerText
:
""
let
text
=
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
answerText
?
this
.
g_formData
.
dataArray
[
this
.
m_currentQuestionIndex
].
answerText
:
""
let
textArray
=
text
.
split
(
/
\n
/
)
let
textArray
=
text
.
split
(
/
\n
/
)
let
lastIndex
=
textArray
.
length
;
let
lastIndex
=
textArray
.
length
;
this
.
g_cartoon
.
playAudio
(
"
click_btn
"
)
this
.
g_cartoon
.
playAudio
(
"
click_btn
"
)
jelly
(
btnAnswer
.
ref
);
jelly
(
btnAnswer
.
ref
);
btnAnswer
.
canClick
=
false
;
textArray
.
forEach
((
item
,
index
)
=>
{
textArray
.
forEach
((
item
,
index
)
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
scrollPannel
.
insertAnswer
(
item
);
scrollPannel
.
insertAnswer
(
item
);
...
@@ -717,9 +734,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -717,9 +734,11 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
nextQuestion
((
status
)
=>
{
this
.
nextQuestion
((
status
)
=>
{
if
(
status
)
{
if
(
status
)
{
btnQuestion
.
show
(()
=>
{
btnQuestion
.
show
(()
=>
{
btnAnswer
.
canClick
=
true
;
this
.
g_enableMapDown
=
true
;
this
.
g_enableMapDown
=
true
;
})
})
}
else
{
}
else
{
btnAnswer
.
canClick
=
true
;
this
.
g_enableMapDown
=
true
;
this
.
g_enableMapDown
=
true
;
}
}
})
})
...
...
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