Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xy_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
xy_video
Commits
41b4a23f
Commit
41b4a23f
authored
Aug 20, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
64337e52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
3 deletions
+52
-3
xy_video.js
assets/xy_video/Scene/xy_video.js
+52
-3
No files found.
assets/xy_video/Scene/xy_video.js
View file @
41b4a23f
...
...
@@ -153,7 +153,7 @@ cc.Class({
// this.playButton.node.active = true;
// this.pauseButton.node.active = false;
});
this
.
videoPlayer
.
node
.
on
(
'
completed
'
,
()
=>
{
this
.
videoPlayer
.
node
.
on
(
'
completed
'
,
async
()
=>
{
console
.
log
(
'
completed
'
);
this
.
videoPlayer
.
currentTime
=
0
;
// this.playButton.node.active = true;
...
...
@@ -161,7 +161,17 @@ cc.Class({
// 上报答题结果
if
(
window
&&
window
.
courseware
)
{
window
.
courseware
.
sendAnswer
({
isOver
:
true
,
video_url
:
this
.
data
.
video_url
});
window
.
courseware
.
sendAnswer
({
isOver
:
true
,
video_url
:
this
.
data
.
video_url
,
score
:
this
.
data
.
questionScore
});
await
this
.
showFinal
();
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
mc
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
// // 切换下一页
mc
.
goNextPage
();
}
else
{
console
.
log
(
"
==切换下一页==
"
);
}
}
});
...
...
@@ -263,7 +273,46 @@ cc.Class({
this
.
page_view
.
getComponent
(
cc
.
PageView
).
scrollToPage
(
index
+
1
,
0.3
);
this
.
updataTipArrow
();
});
},
},
async
showFinal
()
{
let
final
=
cc
.
find
(
"
final
"
,
this
.
node
);
let
f_group
=
cc
.
find
(
"
f_group
"
,
final
);
f_group
.
scale
=
1
;
f_group
.
setPosition
(
0
,
-
265
);
f_group
.
active
=
true
;
await
asyncLoadDragonBoneAnime
(
f_group
,
{
skeJsonData
:
this
.
data
.
endImgAni
.
ske
,
texJsonData
:
this
.
data
.
endImgAni
.
tex
,
texPngData
:
this
.
data
.
endImgAni
.
png
});
const
animaNode
=
f_group
[
'
animaNode
'
];
const
db
=
animaNode
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
let
anis
=
db
.
getAnimationNames
(
"
armatureName
"
);
db
.
playAnimation
(
anis
[
0
],
0
);
this
.
playLocalAudio
(
"
success
"
);
final
.
active
=
true
;
let
desc
=
cc
.
find
(
"
desc
"
,
f_group
);
let
final_title
=
cc
.
find
(
"
final_title
"
,
f_group
);
let
head
=
cc
.
find
(
"
top/player/mask
"
,
this
.
node
);
let
worldPoint
=
head
.
convertToWorldSpaceAR
(
cc
.
v2
(
0
,
0
));
let
pos
=
final
.
convertToNodeSpaceAR
(
worldPoint
);
desc
.
getComponent
(
cc
.
Label
).
string
=
this
.
data
.
endImgTitle
||
""
;
await
asyncDelay
(
2
);
desc
.
active
=
true
;
final_title
.
active
=
true
;
await
asyncDelay
(
1
);
let
sc
=
cc
.
scaleTo
(
0.2
,
0.2
);
var
actionTo
=
cc
.
jumpTo
(
1
,
cc
.
v2
(
pos
.
x
,
pos
.
y
),
300
,
1
);
let
call
=
cc
.
callFunc
(()
=>
{
final
.
active
=
false
;
})
f_group
.
runAction
(
cc
.
sequence
(
sc
,
actionTo
,
call
));
},
initdDrag
()
{
const
maxX
=
this
.
ProgressBar
.
node
.
width
;
const
minX
=
0
;
...
...
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