人生啊人生 il y a 2 semaines
Parent
commit
706bf82fe0

+ 19 - 0
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvCarEventClick.js

@@ -416,7 +416,26 @@ export class QingXiCheAndQvCarEventClick {
 
                 // console.log("绕车一周 每帧执行");
                 let aroundTheCarPointBool = objThreeWorldEventMain.aroundTheCarPointBool();
+                // console.log("绕车一周 每帧执行 ---", aroundTheCarPointBool);
 
+                if (aroundTheCarPointBool == true) {
+
+                    QingXiCheAndQvCarEvent.find().eventEnd = 2;
+                    QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
+                    QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
+                    thisClass.renderEventBool = false;
+
+                    // 记录当前的视角,解决人物,切换到新的视角的时候,会出现一个很长的过度问题
+                    objThreeWorldEventMain.coordinateMoveSphereFollowUpdate();
+
+                    ElMessageBox.alert('恭喜你,完成了当前任务,请点击下一步继续', '提示', {
+                        confirmButtonText: '知道了',
+                        callback: (action) => {
+                            
+                        },
+                    });
+
+                }
                 
 
                 break;

+ 14 - 4
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvThreeWorldEventMain.js

@@ -341,6 +341,16 @@ export class QingXiCheAndQvThreeWorldEventMain {
         var ChengGuangYuanJing = this.objIframe.ChengGuangYuanJing;
 
         var absolutePosition = ChengGuangYuanJing.Role.find().objRole._absolutePosition;
+
+        // 先判断是否完成绕一圈的逻辑
+        let aroundTheCarPointNum = 0;
+        for (let key in QingXiCheAndQvCarEvent.find().aroundTheCarPointRecord) {
+            aroundTheCarPointNum += 1;
+        }
+
+        if (aroundTheCarPointNum >= 8) {
+            return true;
+        }
         
         for (let key in QingXiCheAndQvCarEvent.find().aroundTheCarPoint) {
 
@@ -359,11 +369,11 @@ export class QingXiCheAndQvThreeWorldEventMain {
                 new BABYLON.Vector3(parseFloat(positionTarget.x), parseFloat(positionTarget.y), parseFloat(positionTarget.z))
             );
 
-            console.log('aroundTheCarPointBool ---', key, thisVector3distanceTo);
+            // console.log('aroundTheCarPointBool ---', key, thisVector3distanceTo);
 
-            // if (thisVector3distanceTo <= 9) {
-            //     return true;
-            // }
+            if (thisVector3distanceTo <= 3) {
+                QingXiCheAndQvCarEvent.find().aroundTheCarPointRecord[key] = key;
+            }
             
         }