Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cc_mz_write_02
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
cc_mz_write_02
Commits
accdb0c9
Commit
accdb0c9
authored
Oct 25, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
092546fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
cc_mz_write_02.js
assets/cc_mz_write_02/scene/cc_mz_write_02.js
+26
-7
No files found.
assets/cc_mz_write_02/scene/cc_mz_write_02.js
View file @
accdb0c9
...
@@ -511,10 +511,10 @@ cc.Class({
...
@@ -511,10 +511,10 @@ cc.Class({
//调起检测
//调起检测
startTesting
()
{
startTesting
()
{
//
this.getPhotoData((data) => {
this
.
getPhotoData
((
data
)
=>
{
//
this.photoEnd(data);
this
.
photoEnd
(
data
);
//
});
});
//
return;
return
;
const
cw
=
window
.
courseware
;
const
cw
=
window
.
courseware
;
...
@@ -598,6 +598,9 @@ cc.Class({
...
@@ -598,6 +598,9 @@ cc.Class({
this
.
debugDrawLayer
.
removeAllChildren
();
this
.
debugDrawLayer
.
removeAllChildren
();
this
.
checkIsRightArea
(
data
);
const
answerData
=
this
.
getAnswerData
(
data
);
const
answerData
=
this
.
getAnswerData
(
data
);
this
.
showUserRight
(
answerData
,
data
);
this
.
showUserRight
(
answerData
,
data
);
...
@@ -1060,6 +1063,21 @@ cc.Class({
...
@@ -1060,6 +1063,21 @@ cc.Class({
}
}
const
sentence
=
line
.
content
;
const
sentence
=
line
.
content
;
const
label
=
this
.
getLabel
(
sentence
,
150
);
label
.
x
=
line
.
left
*
this
.
debugBgImg
.
width
;
label
.
y
=
-
(
line
.
top
+
(
line
.
bottom
-
line
.
top
)
/
2
)
*
this
.
debugBgImg
.
height
;
label
.
parent
=
this
.
debugDrawLayer
;
label
.
zIndex
=
200
;
// label.color = cc.Color.RED;
const
l
=
label
.
getComponent
(
cc
.
Label
);
label
.
anchorX
=
0
;
console
.
log
(
'
sentence~:
'
,
sentence
);
if
(
this
.
checkIsInsert
(
textArr
,
sentence
))
{
if
(
this
.
checkIsInsert
(
textArr
,
sentence
))
{
return
line
;
return
line
;
}
}
...
@@ -1221,7 +1239,7 @@ cc.Class({
...
@@ -1221,7 +1239,7 @@ cc.Class({
picNode
.
hitCount
++
;
picNode
.
hitCount
++
;
if
(
picNode
.
hitCount
<
2
)
{
if
(
picNode
.
hitCount
<
1
)
{
return
;
return
;
}
}
...
@@ -1997,12 +2015,13 @@ cc.Class({
...
@@ -1997,12 +2015,13 @@ cc.Class({
this
.
debugLayer
.
addChild
(
label
);
this
.
debugLayer
.
addChild
(
label
);
},
},
getLabel
(
text
)
{
getLabel
(
text
,
fontSize
=
20
)
{
const
labelNode
=
new
cc
.
Node
();
const
labelNode
=
new
cc
.
Node
();
const
label
=
labelNode
.
addComponent
(
cc
.
Label
);
const
label
=
labelNode
.
addComponent
(
cc
.
Label
);
label
.
string
=
text
;
label
.
string
=
text
;
labelNode
.
color
=
cc
.
Color
.
BLACK
;
labelNode
.
color
=
cc
.
Color
.
BLACK
;
label
.
fontSize
=
20
;
label
.
fontSize
=
fontSize
;
label
.
lineHeight
=
fontSize
;
return
labelNode
;
return
labelNode
;
},
},
...
...
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