人生啊人生 1 month ago
parent
commit
c5245d74e5

+ 4 - 1
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvCarEvent.js

@@ -223,6 +223,7 @@ export class QingXiCheAndQvCarEvent {
         // 进入新的流程,默认没有完成
         this.eventName = type;
         this.eventEnd = 0;
+        QingXiCheAndQvCarEventClick.find().renderEventBool = false;
 
         // 优先关闭弹窗文本窗口
         WindowEvent.find().WindowTxtViewOpenExit();
@@ -244,7 +245,7 @@ export class QingXiCheAndQvCarEvent {
             case '人物换装':
                 thisClass.work_new_0();
                 break;
-                
+
             // 行至车辆区域
             case '行至车辆区域':
                 thisClass.work_new_0_1();
@@ -621,6 +622,8 @@ export class QingXiCheAndQvCarEvent {
         objThreeWorldEventMain.commonBirthplaceUpdate();
         objIframeEdit.modelPeopleLook(1);
         objIframeEdit.roleShow(true);
+
+        QingXiCheAndQvCarEventClick.find().renderEventBool = true;
         
         thisClass.tipsBtnsUpOpenEventCallbackMain(false);
         thisClass.tipsBtnsDownOpenEventCallbackMain(false);

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

@@ -41,6 +41,10 @@ export class QingXiCheAndQvCarEventClick {
             "x" : 0, "y" : 0, "z" : 0
         };
 
+        // 是否开启每帧判断的逻辑
+        this.renderEventBool = false;
+
+
     }
 
     // 实现单例模式
@@ -351,6 +355,49 @@ export class QingXiCheAndQvCarEventClick {
 
     }
 
+    /**
+     * 每帧被执行,用于判断距离等情况使用
+     */
+    renderEvent = () => {
+
+        let thisClass = this;
+        let objThreeWorldEventMain = this.objThreeWorldEventMain;
+
+        let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
+        let objIframe = objThreeWorldEventMain.objIframe;
+        let objScene = objThreeWorldEventMain.objScene;
+        let BABYLON = objThreeWorldEventMain.BABYLON;
+        let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
+        
+
+        if (thisClass.renderEventBool == false) {
+            return this;
+        }
+
+        if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
+            return this;
+        }
+
+        let type = QingXiCheAndQvCarEvent.find().eventName;
+
+        // console.log("每帧 renderEvent ---", type);
+
+        switch (type) {
+
+            case ' 行至车辆区域':
+
+                
+
+
+
+                break;
+
+        }
+
+
+    }
+
+
     /**
      * 鼠标弹起的时候
      * 根据点击到的物体,和当前的流程,触发对应的逻辑

+ 1 - 0
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvThreeWorldEvent.js

@@ -243,6 +243,7 @@ export class QingXiCheAndQvThreeWorldEvent {
             ComVal.find().fpsEventMain();
 
             QingXiCheAndQvComHighlightLayer.find().flickerBoolEvent();
+            QingXiCheAndQvCarEventClick.find().renderEvent();
 
             if (
                 QingXiCheAndQvCarEventClick.find().moveCameraRadius != null && QingXiCheAndQvCarEventClick.find().moveCameraRadius != undefined