Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
video_letter_card
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
video_letter_card
Commits
166527ce
Commit
166527ce
authored
Jun 21, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
a51eee09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
14 deletions
+26
-14
video_letter_card.js
assets/video_letter_card/scene/video_letter_card.js
+26
-14
No files found.
assets/video_letter_card/scene/video_letter_card.js
View file @
166527ce
...
@@ -1231,7 +1231,7 @@ cc.Class({
...
@@ -1231,7 +1231,7 @@ cc.Class({
this
.
initVideoNode
();
this
.
initVideoNode
();
this
.
startTiming
();
...
@@ -1263,10 +1263,7 @@ cc.Class({
...
@@ -1263,10 +1263,7 @@ cc.Class({
if
(
script
.
showTipRemoveCard
)
{
if
(
script
.
showTipRemoveCard
)
{
script
.
showTipRemoveCard
(()
=>
{
script
.
showTipRemoveCard
(()
=>
{
this
.
checkVideoCanPlay
();
this
.
startTesting
();
// this.startTesting();
// this.startTiming();
})
})
}
}
...
@@ -1279,7 +1276,7 @@ cc.Class({
...
@@ -1279,7 +1276,7 @@ cc.Class({
}
}
})
})
}
else
{
}
else
{
this
.
checkVideoCanPlay
();
}
}
},
},
...
@@ -1433,11 +1430,10 @@ cc.Class({
...
@@ -1433,11 +1430,10 @@ cc.Class({
const
quesBg
=
getSprNode
(
"
ques_bg
"
);
const
quesBg
=
getSprNode
(
"
ques_bg
"
);
const
quesBgSpr
=
quesBg
.
getComponent
(
cc
.
Sprite
);
const
quesBgSpr
=
quesBg
.
getComponent
(
cc
.
Sprite
);
quesBgSpr
.
type
=
cc
.
Sprite
.
Type
.
SLICED
;
quesBgSpr
.
type
=
cc
.
Sprite
.
Type
.
SLICED
;
this
.
bgLayer
.
addChild
(
quesBg
,
5
);
//
this.bgLayer.addChild(quesBg, 5);
quesBg
.
y
=
this
.
canvas
.
height
/
5
;
quesBg
.
y
=
this
.
canvas
.
height
/
5
;
this
.
quesPanel
=
quesBg
;
this
.
quesPanel
=
quesBg
;
quesBg
.
opacity
=
0
;
quesBg
.
baseW
=
quesBg
.
width
;
quesBg
.
baseW
=
quesBg
.
width
;
...
@@ -1641,9 +1637,16 @@ cc.Class({
...
@@ -1641,9 +1637,16 @@ cc.Class({
if
(
!
this
.
video
)
{
if
(
!
this
.
video
)
{
return
;
return
;
}
}
this
.
isFristPlayEnd
=
false
;
this
.
video
.
remoteURL
=
this
.
video_url
;
this
.
video
.
remoteURL
=
this
.
video_url
;
this
.
appearAnim
(
this
.
videoNode
,
0.3
);
this
.
appearAnim
(
this
.
videoNode
,
0.3
,
()
=>
{
this
.
toMaxVideo
();
this
.
video
.
play
();
});
},
},
...
@@ -1652,7 +1655,7 @@ cc.Class({
...
@@ -1652,7 +1655,7 @@ cc.Class({
this
.
quesPanel
.
opacity
=
0
;
this
.
quesPanel
.
opacity
=
0
;
this
.
refreshQuesLabel
();
this
.
refreshQuesLabel
();
this
.
refreshVideo
();
this
.
refreshVideo
();
//
this.appearAnim(this.quesPanel, 0.3);
this
.
appearAnim
(
this
.
quesPanel
,
0.3
);
this
.
isCanEmitBubble
=
true
;
this
.
isCanEmitBubble
=
true
;
},
},
...
@@ -2029,8 +2032,8 @@ cc.Class({
...
@@ -2029,8 +2032,8 @@ cc.Class({
if
(
!
this
.
isFristPlayEnd
)
{
if
(
!
this
.
isFristPlayEnd
)
{
//首次结束
//首次结束
this
.
startTesting
();
this
.
s
tartTiming
();
this
.
s
howTipRemoveCard
();
this
.
isFristPlayEnd
=
true
;
this
.
isFristPlayEnd
=
true
;
}
}
...
@@ -2898,6 +2901,8 @@ cc.Class({
...
@@ -2898,6 +2901,8 @@ cc.Class({
async
changeNextQues
()
{
async
changeNextQues
()
{
this
.
endTesting
();
this
.
isCanCheck
=
false
;
this
.
isCanCheck
=
false
;
this
.
quesArrIndex
++
;
this
.
quesArrIndex
++
;
...
@@ -3058,19 +3063,25 @@ cc.Class({
...
@@ -3058,19 +3063,25 @@ cc.Class({
this
.
jumpBtn
.
active
=
false
;
this
.
jumpBtn
.
active
=
false
;
},
},
appearAnim
(
node
,
time
=
1
)
{
appearAnim
(
node
,
time
=
1
,
callback
=
null
)
{
node
.
active
=
true
;
node
.
active
=
true
;
node
.
opacity
=
0
node
.
opacity
=
0
cc
.
tween
(
node
)
cc
.
tween
(
node
)
.
to
(
time
,
{
opacity
:
255
},
{
easing
:
"
cubicIn
"
})
.
to
(
time
,
{
opacity
:
255
},
{
easing
:
"
cubicIn
"
})
.
call
(()
=>
{
callback
&&
callback
();
})
.
start
();
.
start
();
},
},
disappearAnim
(
node
,
time
=
1
)
{
disappearAnim
(
node
,
time
=
1
,
callback
)
{
node
.
active
=
true
;
node
.
active
=
true
;
node
.
opacity
=
255
node
.
opacity
=
255
cc
.
tween
(
node
)
cc
.
tween
(
node
)
.
to
(
time
,
{
opacity
:
0
},
{
easing
:
"
cubicOut
"
})
.
to
(
time
,
{
opacity
:
0
},
{
easing
:
"
cubicOut
"
})
.
call
(()
=>
{
callback
&&
callback
();
})
.
start
();
.
start
();
},
},
...
@@ -8302,6 +8313,7 @@ cc.Class({
...
@@ -8302,6 +8313,7 @@ cc.Class({
changeNextQuestion
()
{
changeNextQuestion
()
{
console
.
log
(
'
in changeNextQuestion
'
)
console
.
log
(
'
in changeNextQuestion
'
)
this
.
curQuestionIndex
++
;
this
.
curQuestionIndex
++
;
this
.
setCurQuestionData
();
this
.
setCurQuestionData
();
...
...
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