Commit b046046d authored by limingzhe's avatar limingzhe

fix: debug

parent 401646d5
......@@ -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.setOnePic(data, bg);
const rectNode = this.setOneRect(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?.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.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();
// }
bg.active = false;
// if (rectNode.audioClip) {
// cc.audioEngine.stopAllEffects();
// cc.audioEngine.playEffect(rectNode.audioClip, false, 0.8);
// }
this.hand.active = false;
});
return rectNode;
......
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