Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM4-13
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
YM4-13
Commits
34383e6d
Commit
34383e6d
authored
Jan 10, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix
parent
aa694013
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
play.component.ts
src/app/play/play.component.ts
+10
-6
No files found.
src/app/play/play.component.ts
View file @
34383e6d
...
@@ -134,7 +134,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -134,7 +134,8 @@ export class PlayComponent implements OnInit, OnDestroy {
m_answerAll_left
=
[]
m_answerAll_left
=
[]
m_answerAll_middle
=
[]
m_answerAll_middle
=
[]
m_answerAll_right
=
[]
m_answerAll_right
=
[]
m_centerAdjust
=
300
m_centerAdjust
=
300
;
m_index
=
0
;
// ------------------------------------
// ------------------------------------
...
@@ -264,7 +265,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -264,7 +265,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
m_currentQuestionIndex_right
=
0
;
this
.
m_currentQuestionIndex_right
=
0
;
this
.
m_answerAll_left
=
[]
this
.
m_answerAll_left
=
[]
this
.
m_answerAll_middle
=
[]
this
.
m_answerAll_middle
=
[]
this
.
m_answerAll_right
=
[]
this
.
m_answerAll_right
=
[];
this
.
m_index
=
0
;
}
}
startGame
(){
startGame
(){
...
@@ -527,7 +529,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -527,7 +529,7 @@ export class PlayComponent implements OnInit, OnDestroy {
elementDrag
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-puzzle-
"
+
index
+
"
_
"
+
side
,
"
"
+
item
.
media
.
text
+
"
"
,
"
MMTextBook-Bold
"
,
"
#000
"
,
36
*
this
.
g_mapScale
,
-
500
,
-
500
)
elementDrag
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-puzzle-
"
+
index
+
"
_
"
+
side
,
"
"
+
item
.
media
.
text
+
"
"
,
"
MMTextBook-Bold
"
,
"
#000
"
,
36
*
this
.
g_mapScale
,
-
500
,
-
500
)
let
textShow
=
null
let
textShow
=
null
textShow
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-puzzle-
"
+
index
+
"
_
"
+
side
,
"
"
+
item
.
media
.
text
+
"
"
,
"
FuturaBT-Medium
"
,
"
#557790
"
,
36
*
this
.
g_mapScale
,
element
.
ref
.
x
,
element
.
ref
.
y
)
textShow
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-puzzle-
"
+
index
+
"
_
"
+
side
,
"
"
+
item
.
media
.
text
+
"
"
,
"
MMTextBook
"
,
"
#557790
"
,
36
*
this
.
g_mapScale
,
element
.
ref
.
x
,
element
.
ref
.
y
)
this
.
render
(
element
.
ref
)
this
.
render
(
element
.
ref
)
this
.
render
(
textShow
.
ref
)
this
.
render
(
textShow
.
ref
)
...
@@ -817,14 +819,15 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -817,14 +819,15 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
})
})
let
number_text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`question-index-
${
side
}
-
${
index
}
`
,
(
index
+
1
)
+
""
,
"
TCB___
"
,
"
#FFF
"
,
36
,
(
w
,
h
)
=>
{
let
number_text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`question-index-
${
side
}
-
${
index
}
`
,
(
this
.
m_
index
+
1
)
+
""
,
"
TCB___
"
,
"
#FFF
"
,
36
,
(
w
,
h
)
=>
{
return
{
return
{
x
:
0
,
x
:
0
,
y
:
2
y
:
2
}
}
})
})
number
.
ref
.
addChild
(
number_text
.
ref
)
number
.
ref
.
addChild
(
number_text
.
ref
)
this
.
m_index
++
;
let
line
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`line-word-line-
${
side
}
-
${
index
}
`
,
"
line
"
,
(
w
,
h
)
=>
{
let
line
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`line-word-line-
${
side
}
-
${
index
}
`
,
"
line
"
,
(
w
,
h
)
=>
{
return
{
return
{
sx
:
240
/
w
,
sx
:
240
/
w
,
...
@@ -854,7 +857,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -854,7 +857,8 @@ export class PlayComponent implements OnInit, OnDestroy {
textShow
.
ref
.
alpha
=
0
;
textShow
.
ref
.
alpha
=
0
;
textShow
.
ref
.
x
=
startX
+
textShow
.
ref
.
width
/
2
textShow
.
ref
.
x
=
startX
+
textShow
.
ref
.
width
/
2
startX
+=
textShow
.
ref
.
width
startX
+=
textShow
.
ref
.
width
totalWidth
+=
textShow
.
ref
.
width
totalWidth
+=
textShow
.
ref
.
width
;
textShow
.
ref
.
y
=
-
4
;
element
.
ref
.
addChild
(
textShow
.
ref
)
element
.
ref
.
addChild
(
textShow
.
ref
)
})
})
...
...
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