Commit 8cbedf7d authored by 李维's avatar 李维

删除无用代码

parent a89d57ab
......@@ -95,6 +95,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAnima() {}
isDestroy = false;
startTimestamp = null;
async onLoadEnd() {
// TODO 加载完成后的逻辑写在这里
......@@ -394,27 +395,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 隐藏视频控制组件
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.currentVideoPlay.currentTime = percent * this.videoDuration;
// this.showProgressBar();
})
// 监听组件发来视频播放、暂停事件
......@@ -424,24 +408,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else {
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;
......@@ -3666,13 +3633,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onDestroy() {
this.isDestroy = true;
cc.audioEngine.stop(this.currentAudioPlay);
}
update() {
// if (this.isDestroy) {
// return;
// }
if (this.isDestroy) {
return;
}
if(this.currentVideoPlay != null) {
// 更新当前进度条
......@@ -3682,11 +3650,5 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.videoControlBar.emit("update_video_progress", this.currentVideoPlay.currentTime)
}
}
// 如果没有正在拖动中 检查是否为题目停止
// if(!this.isDragProgressBar) {
// this.updateCheckStop();
// }
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment