Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
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
DG_FAF
Commits
8cbedf7d
Commit
8cbedf7d
authored
Apr 13, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用代码
parent
a89d57ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
43 deletions
+5
-43
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+5
-43
No files found.
assets/DG_FAF/scene/DG_FAF.ts
View file @
8cbedf7d
...
@@ -95,6 +95,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -95,6 +95,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAnima
()
{}
addPreloadAnima
()
{}
isDestroy
=
false
;
startTimestamp
=
null
;
startTimestamp
=
null
;
async
onLoadEnd
()
{
async
onLoadEnd
()
{
// TODO 加载完成后的逻辑写在这里
// TODO 加载完成后的逻辑写在这里
...
@@ -394,27 +395,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -394,27 +395,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 隐藏视频控制组件
// 隐藏视频控制组件
this
.
videoControlBar
.
emit
(
"
hide_bar
"
,
true
);
this
.
videoControlBar
.
emit
(
"
hide_bar
"
,
true
);
// 监听组件发来的拖动开始和结束消息
this
.
videoControlBar
.
on
(
"
on_drag_button
"
,
(
isDragStart
)
=>
{
// if(isDragStart) {
// this.hideWaitingVideo();
// this.isDragProgressBar = true;
// this.video.pause();
// this.videoControlBar.emit("update_video_status", 0);
// this.cleanProgressBarTimer();
// } else {
// this.restQuesData(this.video.currentTime);
// this.isDragProgressBar = false;
// this.video.play();
// this.videoControlBar.emit("update_video_status", 1);
// this.setProgressBarTimer();
// }
})
// 监听组件发来的拖动百分比
// 监听组件发来的拖动百分比
this
.
videoControlBar
.
on
(
"
on_drag_percent
"
,
(
percent
)
=>
{
this
.
videoControlBar
.
on
(
"
on_drag_percent
"
,
(
percent
)
=>
{
this
.
currentVideoPlay
.
currentTime
=
percent
*
this
.
videoDuration
;
this
.
currentVideoPlay
.
currentTime
=
percent
*
this
.
videoDuration
;
// this.showProgressBar();
})
})
// 监听组件发来视频播放、暂停事件
// 监听组件发来视频播放、暂停事件
...
@@ -424,24 +408,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -424,24 +408,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
else
{
}
else
{
this
.
currentVideoPlay
.
pause
();
this
.
currentVideoPlay
.
pause
();
}
}
// this.cleanProgressBarTimer();
// this.setProgressBarTimer();
// if(isPlay) {
// if(this.isWaitingUserAction) {
// this.hideWaitingVideo();
// this.restQuesData(this.video.currentTime);
// }
// this.video.play();
// } else {
// this.video.pause();
// }
})
})
this
.
videoControlBar
.
on
(
"
on_touch_progressbar
"
,
(
e
)
=>
{
// console.log("Click bar")
// this.showProgressBar();
})
}
}
scoreShowContainer
=
null
;
scoreShowContainer
=
null
;
...
@@ -3666,13 +3633,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -3666,13 +3633,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
onDestroy
()
{
onDestroy
()
{
this
.
isDestroy
=
true
;
cc
.
audioEngine
.
stop
(
this
.
currentAudioPlay
);
cc
.
audioEngine
.
stop
(
this
.
currentAudioPlay
);
}
}
update
()
{
update
()
{
//
if (this.isDestroy) {
if
(
this
.
isDestroy
)
{
//
return;
return
;
//
}
}
if
(
this
.
currentVideoPlay
!=
null
)
{
if
(
this
.
currentVideoPlay
!=
null
)
{
// 更新当前进度条
// 更新当前进度条
...
@@ -3682,11 +3650,5 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -3682,11 +3650,5 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
videoControlBar
.
emit
(
"
update_video_progress
"
,
this
.
currentVideoPlay
.
currentTime
)
this
.
videoControlBar
.
emit
(
"
update_video_progress
"
,
this
.
currentVideoPlay
.
currentTime
)
}
}
}
}
// 如果没有正在拖动中 检查是否为题目停止
// if(!this.isDragProgressBar) {
// this.updateCheckStop();
// }
}
}
}
}
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