|
@@ -1,4 +1,5 @@
|
|
|
import { QingXiCheAndQvThreeWorldEvent } from './QingXiCheAndQvThreeWorldEvent.js';
|
|
|
+import { QingXiCheAndQvCarEvent } from './QingXiCheAndQvCarEvent.js';
|
|
|
|
|
|
/**
|
|
|
* 操作3d世界的,单例模式的类对象
|
|
@@ -326,6 +327,49 @@ export class QingXiCheAndQvThreeWorldEventMain {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断人物是否绕车一周完成
|
|
|
+ * 完成返回 true , 否则返回 false
|
|
|
+ */
|
|
|
+ aroundTheCarPointBool = () => {
|
|
|
+
|
|
|
+ var objIframeEdit = this.objIframeEdit;
|
|
|
+ var objIframe = this.objIframe;
|
|
|
+ var scene = this.objScene;
|
|
|
+ var BABYLON = this.BABYLON;
|
|
|
+ var ChengGuangYuanJing = this.objIframe.ChengGuangYuanJing;
|
|
|
+
|
|
|
+ var absolutePosition = ChengGuangYuanJing.Role.find().objRole._absolutePosition;
|
|
|
+
|
|
|
+ // var positionTarget = {
|
|
|
+ // 'x' : 8.27173,
|
|
|
+ // 'y' : 1.01,
|
|
|
+ // 'z' : -17.70557,
|
|
|
+ // }
|
|
|
+
|
|
|
+ // // 得到两点之间的距离
|
|
|
+ // let thisVector3distanceTo = BABYLON.Vector3.Distance(
|
|
|
+ // new BABYLON.Vector3(parseFloat(absolutePosition.x), parseFloat(absolutePosition.y), parseFloat(absolutePosition.z)),
|
|
|
+ // new BABYLON.Vector3(parseFloat(positionTarget.x), parseFloat(positionTarget.y), parseFloat(positionTarget.z))
|
|
|
+ // );
|
|
|
+
|
|
|
+ // // console.log('roleAndPositionTargetBool ---', thisVector3distanceTo);
|
|
|
+
|
|
|
+ // if (thisVector3distanceTo <= 9) {
|
|
|
+ // return true;
|
|
|
+ // }
|
|
|
+
|
|
|
+ for (let key in QingXiCheAndQvCarEvent.find().aroundTheCarPoint) {
|
|
|
+
|
|
|
+ let objAroundTheCarPoint = QingXiCheAndQvCarEvent.find().aroundTheCarPoint[key];
|
|
|
+ console.log("objAroundTheCarPoint", objAroundTheCarPoint);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|