Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MRBR_video
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
MRBR_video
Commits
b046046d
Commit
b046046d
authored
Oct 19, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
401646d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
30 deletions
+31
-30
MRBR_video.js
assets/MRBR_video/scene/MRBR_video.js
+31
-30
No files found.
assets/MRBR_video/scene/MRBR_video.js
View file @
b046046d
...
...
@@ -626,6 +626,11 @@ cc.Class({
startWaitVideo
()
{
console
.
log
(
'
in startWaitVideo
'
)
this
.
curQues
.
hotZoneBg
.
active
=
true
;
this
.
hand
.
active
=
true
;
return
;
// const videoNode = this.curQues?.videoObj?.wait_video;
// const video = videoNode.getComponent(cc.VideoPlayer);
// video.node.name = 'wait_video';
...
...
@@ -848,7 +853,7 @@ cc.Class({
curVideoPlayEnd
()
{
switch
(
this
.
video
.
node
.
name
)
{
case
"
ques_video
"
:
//
this.startWaitVideo();
this
.
startWaitVideo
();
break
;
case
"
wait_video
"
:
this
.
continueWaitVideo
();
...
...
@@ -2245,14 +2250,13 @@ cc.Class({
setOneHand
(
data
,
bg
)
{
const
rectNode
=
this
.
setOne
Pic
(
data
,
bg
);
const
rectNode
=
this
.
setOne
Rect
(
data
,
bg
);
const
worldPos
=
rectNode
.
parent
.
convertToWorldSpaceAR
(
cc
.
v2
(
rectNode
.
x
,
rectNode
.
y
))
const
worldPos
=
rectNode
.
parent
.
convertToWorldSpaceAR
(
cc
.
v2
(
rectNode
.
x
-
rectNode
.
width
,
rectNode
.
y
+
rectNode
.
height
/
2
))
const
pos
=
this
.
hand
.
parent
.
convertToNodeSpaceAR
(
worldPos
);
this
.
hand
.
x
=
pos
.
x
;
this
.
hand
.
y
=
pos
.
y
;
this
.
hand
.
active
=
true
;
},
setOneRect
(
data
,
bg
)
{
...
...
@@ -2284,7 +2288,7 @@ cc.Class({
rectNode
.
anchorX
=
rectNode
.
anchorY
=
0
;
if
(
quesData
.
bgItem
.
isShowDebugLine
)
{
if
(
quesData
.
bgItem
.
isShowDebugLine
||
true
)
{
ctx
.
rect
(
0
,
0
,
rectNode
.
width
,
rectNode
.
height
);
}
ctx
.
stroke
();
...
...
@@ -2300,35 +2304,32 @@ cc.Class({
rectNode
.
addComponent
(
cc
.
Button
);
rectNode
.
on
(
'
click
'
,
()
=>
{
if
(
rectNode
.
isClicked
)
{
return
;
}
rectNode
.
isClicked
=
true
;
console
.
log
(
'
clicked
'
);
this
.
video
.
pause
();
//
if (rectNode.isClicked) {
//
return;
//
}
//
rectNode.isClicked = true;
//
console.log('clicked');
//
this.video.pause();
if
(
data
.
selectType
==
'
right
'
)
{
this
.
curQues
.
isRight
=
true
;
this
.
startRightVideo
();
}
else
{
this
.
curQues
.
isRight
=
false
;
//
if (data.selectType == 'right') {
//
this.curQues.isRight = true;
//
this.startRightVideo();
//
} else {
//
this.curQues.isRight = false;
if
(
data
?.
labelArr
)
{
this
.
wrongStartTime
=
Number
(
data
.
labelArr
[
0
].
value
);
this
.
wrongEndTime
=
Number
(
data
.
labelArr
[
1
].
value
);
}
else
{
this
.
wrongStartTime
=
null
;
this
.
wrongEndTime
=
null
;
}
this
.
startWrongVideo
();
}
//
if (data?.labelArr) {
//
this.wrongStartTime = Number(data.labelArr[0].value);
//
this.wrongEndTime = Number(data.labelArr[1].value);
//
} else {
//
this.wrongStartTime = null;
//
this.wrongEndTime = null;
//
}
//
this.startWrongVideo();
//
}
bg
.
active
=
false
;
// if (rectNode.audioClip) {
// cc.audioEngine.stopAllEffects();
// cc.audioEngine.playEffect(rectNode.audioClip, false, 0.8);
// }
this
.
hand
.
active
=
false
;
});
return
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