Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
peppa_pig_finger
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
peppa_pig_finger
Commits
4912d64b
Commit
4912d64b
authored
Sep 28, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
e653e317
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
18 deletions
+36
-18
.DS_Store
.DS_Store
+0
-0
peppa_pig_finger.js
assets/peppa_pig_finger/scene/peppa_pig_finger.js
+36
-18
No files found.
.DS_Store
View file @
4912d64b
No preview for this file type
assets/peppa_pig_finger/scene/peppa_pig_finger.js
View file @
4912d64b
...
...
@@ -724,6 +724,8 @@ initMask() {
console
.
log
(
'
in initView
'
)
// this.data.isDebug = true;
this
.
hideMask
();
this
.
initVideo
();
...
...
@@ -758,9 +760,10 @@ initMask() {
// rightAnim.scale = 1;
// rightAnim.y = 30;
let
display
=
rightAnim
.
getComponent
(
dragonBones
.
ArmatureDisplay
)
display
.
timeScale
=
1
;
display
.
timeScale
=
0.5
;
rightAnim
.
scale
=
1.5
;
rightAnim
.
scale
=
2
;
// this.rightAnim = display;
},
...
...
@@ -1033,15 +1036,15 @@ initMask() {
layer
.
anchorX
=
0
;
layer
.
anchorY
=
1
;
if
(
!
quesData
.
bgItem2
)
{
return
;
continue
;
}
layer
.
data
=
quesData
.
bgItem2
;
cc
.
loader
.
load
({
url
:
quesData
.
bgItem2
.
url
},
(
err
,
img
)
=>
{
quesData
.
debugBgImg
=
img
;
quesData
.
checkBg
=
img
;
layer
.
width
=
img
.
width
;
...
...
@@ -1093,25 +1096,16 @@ initMask() {
quesData
.
debugLayer
=
layer
;
const
drawLayer
=
new
cc
.
Node
();
quesData
.
debugLayer
.
addChild
(
drawLayer
,
2
);
quesData
.
debugDrawLayer
=
drawLayer
;
// if (i != 0) {
// quesData.debugLayer.active = false;
// }
}
},
...
...
@@ -1575,6 +1569,11 @@ showStartLight() {
this
.
quesIndex
++
;
this
.
initCurQues
();
if
(
this
.
curQues
?.
debugLayer
)
{
this
.
curQues
.
debugLayer
.
active
=
true
;
}
// this.initVideoRemote();
return
;
...
...
@@ -2764,6 +2763,10 @@ showStartLight() {
const
{
x
,
y
}
=
data
;
const
colorDot
=
this
.
getColorDot
(
x
,
-
y
,
0.05
,
0.05
);
// const colorDot = this.getColorDot(0, 0, 0.05, 0.05);
// this.canvas.addChild(colorDot);
this
.
curQues
.
debugDrawLayer
.
addChild
(
colorDot
,
1
);
...
...
@@ -2879,12 +2882,17 @@ showStartLight() {
const
dotV2
=
new
cc
.
Vec2
(
rect
.
x
+
rect
.
width
/
2
,
rect
.
y
+
rect
.
height
/
2
);
const
checkArr
=
this
.
curQues
.
starRectCheckArr
;
// console.log("checkArr: " ,checkArr);
for
(
let
i
=
0
;
i
<
checkArr
.
length
;
i
++
)
{
const
checkRect
=
checkArr
[
i
].
ccRect
;
const
key
=
checkArr
[
i
].
data
.
index
+
1
;
console
.
log
(
"
checkRect:
"
,
checkRect
);
console
.
log
(
"
dotV2:
"
,
dotV2
);
if
(
checkRect
.
contains
(
dotV2
))
{
answerData
[
key
]
=
{
isFinish
:
true
};
}
...
...
@@ -2903,7 +2911,9 @@ showStartLight() {
const
animaNode
=
this
.
curQues
.
starAnimaArr
[
i
];
const
key
=
(
animaNode
.
data
.
index
+
1
).
toString
();
// const key = (animaNode.data.index + 1).toString();
const
key
=
(
i
+
1
).
toString
();
// console.log('~animaNode: ', animaNode)
// console.log('~key: ', key)
...
...
@@ -2966,6 +2976,10 @@ showStartLight() {
w
*=
this
.
curQues
.
debugBgImg
.
width
;
h
*=
this
.
curQues
.
debugBgImg
.
height
;
console
.
log
(
"
w: ~
"
+
w
);
console
.
log
(
"
h: ~
"
+
h
);
console
.
log
(
"
this.curQues.debugLayer: ~
"
,
this
.
curQues
.
debugLayer
);
if
(
this
.
curQues
.
debugLayer
.
parent
&&
this
.
curQues
.
debugLayer
.
active
)
{
const
rect
=
{
...
...
@@ -3011,6 +3025,8 @@ showStartLight() {
}
else
if
(
this
.
data2
!=
true
)
{
photoData
=
{
"
page_id
"
:
"
3
"
,
"
book_name
"
:
"
LWP_L2_B01_OnTheBoat_LotsofJobs_LOWRES
"
}
this
.
data2
=
true
;
}
else
if
(
this
.
data3
!=
true
)
{
...
...
@@ -3027,10 +3043,11 @@ showStartLight() {
this
.
data6
=
true
;
}
}
else
{
// photoData = {"x":"0.55","y":"0.13"};
photoData
=
{
"
x
"
:
"
0.26
"
,
"
y
"
:
"
0.65
"
};
photoData
=
{
"
x
"
:
"
0.21
"
,
"
y
"
:
"
0.80
"
};
// photoData = {"x":"0.26","y":"0.65"};
// photoData = {"x":"0.64","y":"0.69"}
}
cb
(
photoData
);
...
...
@@ -3757,7 +3774,7 @@ showStartLight() {
rectNode
.
anchorX
=
rectNode
.
anchorY
=
0
;
if
(
quesData
.
bgItem
.
isShowDebugLine
)
{
if
(
quesData
.
bgItem
.
isShowDebugLine
||
this
.
data
.
isDebug
)
{
ctx
.
rect
(
0
,
0
,
rectNode
.
width
,
rectNode
.
height
);
}
ctx
.
stroke
();
...
...
@@ -3775,6 +3792,7 @@ showStartLight() {
});
}
console
.
log
(
"
rectNode~:
"
,
rectNode
);
animaNode
.
rectNode
=
rectNode
;
...
...
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