Commit b046046d authored by limingzhe's avatar limingzhe

fix: debug

parent 401646d5
...@@ -626,6 +626,11 @@ cc.Class({ ...@@ -626,6 +626,11 @@ cc.Class({
startWaitVideo() { startWaitVideo() {
console.log(' in startWaitVideo ') console.log(' in startWaitVideo ')
this.curQues.hotZoneBg.active = true;
this.hand.active = true;
return;
// const videoNode = this.curQues?.videoObj?.wait_video; // const videoNode = this.curQues?.videoObj?.wait_video;
// const video = videoNode.getComponent(cc.VideoPlayer); // const video = videoNode.getComponent(cc.VideoPlayer);
// video.node.name = 'wait_video'; // video.node.name = 'wait_video';
...@@ -848,7 +853,7 @@ cc.Class({ ...@@ -848,7 +853,7 @@ cc.Class({
curVideoPlayEnd() { curVideoPlayEnd() {
switch (this.video.node.name) { switch (this.video.node.name) {
case "ques_video": case "ques_video":
// this.startWaitVideo(); this.startWaitVideo();
break; break;
case "wait_video": case "wait_video":
this.continueWaitVideo(); this.continueWaitVideo();
...@@ -2245,14 +2250,13 @@ cc.Class({ ...@@ -2245,14 +2250,13 @@ cc.Class({
setOneHand(data, bg) { 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); const pos = this.hand.parent.convertToNodeSpaceAR(worldPos);
this.hand.x = pos.x; this.hand.x = pos.x;
this.hand.y = pos.y; this.hand.y = pos.y;
this.hand.active = true;
}, },
setOneRect(data, bg) { setOneRect(data, bg) {
...@@ -2284,7 +2288,7 @@ cc.Class({ ...@@ -2284,7 +2288,7 @@ cc.Class({
rectNode.anchorX = rectNode.anchorY = 0; rectNode.anchorX = rectNode.anchorY = 0;
if (quesData.bgItem.isShowDebugLine) { if (quesData.bgItem.isShowDebugLine || true) {
ctx.rect(0, 0, rectNode.width, rectNode.height); ctx.rect(0, 0, rectNode.width, rectNode.height);
} }
ctx.stroke(); ctx.stroke();
...@@ -2300,35 +2304,32 @@ cc.Class({ ...@@ -2300,35 +2304,32 @@ cc.Class({
rectNode.addComponent(cc.Button); rectNode.addComponent(cc.Button);
rectNode.on('click', () => { rectNode.on('click', () => {
if (rectNode.isClicked) { // if (rectNode.isClicked) {
return; // return;
} // }
rectNode.isClicked = true; // rectNode.isClicked = true;
console.log('clicked'); // console.log('clicked');
this.video.pause(); // this.video.pause();
if (data.selectType == 'right') {
this.curQues.isRight = true;
this.startRightVideo();
} else {
this.curQues.isRight = false;
if (data?.labelArr) { // if (data.selectType == 'right') {
this.wrongStartTime = Number(data.labelArr[0].value); // this.curQues.isRight = true;
this.wrongEndTime = Number(data.labelArr[1].value); // this.startRightVideo();
} else { // } else {
this.wrongStartTime = null; // this.curQues.isRight = false;
this.wrongEndTime = null;
} // if (data?.labelArr) {
this.startWrongVideo(); // 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; bg.active = false;
// if (rectNode.audioClip) { this.hand.active = false;
// cc.audioEngine.stopAllEffects();
// cc.audioEngine.playEffect(rectNode.audioClip, false, 0.8);
// }
}); });
return rectNode; 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