Browse Source

提交bug修改

wartheking 10 months ago
parent
commit
ae5496b571

+ 129 - 1
Assets/Prefabs/MiniMap.prefab

@@ -1,5 +1,101 @@
 %YAML 1.1
 %TAG !u! tag:unity3d.com,2011:
+--- !u!1 &970675354
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 970675355}
+  m_Layer: 0
+  m_Name: AQQ
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &970675355
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 970675354}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: -0.40016234, y: -6.5742188, z: -0.4000244}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1644283074}
+  m_RootOrder: 2
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1644283073
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1644283074}
+  m_Layer: 0
+  m_Name: StaticPoint
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &1644283074
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1644283073}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children:
+  - {fileID: 7646454593676123889}
+  - {fileID: 1060248767511300627}
+  - {fileID: 970675355}
+  m_Father: {fileID: 7069582396450853087}
+  m_RootOrder: 4
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &6012870164663179780
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 7646454593676123889}
+  m_Layer: 0
+  m_Name: BY
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &7646454593676123889
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6012870164663179780}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 8.7359495, y: 14.6875, z: -0.4000244}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1644283074}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &7069582396136518862
 GameObject:
   m_ObjectHideFlags: 0
@@ -72,7 +168,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 7069582396450853080}
-  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 50000, z: -582}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
@@ -81,6 +177,7 @@ Transform:
   - {fileID: 7069582396136518861}
   - {fileID: 7069582397022505400}
   - {fileID: 7069582396837082649}
+  - {fileID: 1644283074}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -247,3 +344,34 @@ MonoBehaviour:
   x_Count: 8
   y_Count: 8
   ab_Name: l14
+--- !u!1 &8396125779924330567
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1060248767511300627}
+  m_Layer: 0
+  m_Name: TK
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &1060248767511300627
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8396125779924330567}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: -0.40016234, y: -6.5742188, z: -0.4000244}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1644283074}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

+ 2 - 2
Assets/Prefabs/UI/RuntimePoint.prefab

@@ -191,9 +191,9 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 325, y: -649.3}
+  m_AnchoredPosition: {x: 325, y: -657.3}
   m_SizeDelta: {x: 100, y: 100}
-  m_Pivot: {x: 0.5, y: 0.1}
+  m_Pivot: {x: 0.5, y: 0.02}
 --- !u!222 &2742062590507750192
 CanvasRenderer:
   m_ObjectHideFlags: 0

File diff suppressed because it is too large
+ 1 - 98
Assets/Scene 1.unity


+ 5 - 5
Assets/Scripts/UI/Tools/CoordinateConverter.cs

@@ -43,19 +43,19 @@ public class CoordinateConverter
     public static Vector3 GeoToUGUISmall(double longitude,double latitude)
     {
 
-        float x = (float)(-48.538f * longitude + 5509.732f);
-        float y = (float)(-50.542f * latitude + 1506.543f);
+        float x = (float)(75.642f * longitude - 8607.658f);
+        float y = (float)(87.990f * latitude - 2640.548f);
 
-        return new Vector3(x, 0, y);
+        return new Vector3(x, y, -0.400f);
     }
 
     
     public static (double Latitude, double Longitude) UGUISmallToGeo(Vector3 uiCoord)
     {
 
-        double latitude = (uiCoord.x + 170020.42) / 1494.66;
+        double latitude = (uiCoord.x + 8607.658) / 75.642;
 
-        double longitude = (uiCoord.y + 44250.98) / 1471.72;
+        double longitude = (uiCoord.y + 2640.548) / 87.990;
 
         // 这里我们忽略了截距,因为我们假设Unity坐标的原点对应于经纬度的截距
         // 如果需要考虑截距,可以在这里添加相应的计算

+ 14 - 12
Assets/Scripts/UI/UIView/YZT/OnePicNav.cs

@@ -39,9 +39,10 @@ public class OnePicNav : MonoBehaviour
 
     void InitButton() {
         shaPan = GameObject.FindGameObjectWithTag("ShaPan");
-        // runtimePointStaticBind.Add(shaPan.transform.GetChild(0).GetChild(0));
-        // runtimePointStaticBind.Add(shaPan.transform.GetChild(0).GetChild(1));
-        // runtimePointStaticBind.Add(shaPan.transform.GetChild(0).GetChild(2));
+        Debug.Log(shaPan);
+        runtimePointStaticBind.Add(shaPan.transform.GetChild(4).GetChild(0));
+        runtimePointStaticBind.Add(shaPan.transform.GetChild(4).GetChild(1));
+        runtimePointStaticBind.Add(shaPan.transform.GetChild(4).GetChild(2));
         CameraManager.SwitchCamera(1);
         btns = new List<Button>();
         Button[] bts = this.GetComponentsInChildren<Button>();
@@ -105,14 +106,15 @@ public class OnePicNav : MonoBehaviour
     // Update is called once per frame
     void Update()
     {
-        // znz.transform.rotation = Quaternion.Lerp(znz.transform.rotation, Quaternion.Euler(0, 0, CameraManager.instance.mainCamera.transform.localEulerAngles.y), Time.deltaTime * 4);
-        //
-        // for (int i = 0; i < runtimePointStatic.Length; i++) {
-        //     bool cameraEnable = CameraManager.instance.secondCamera.enabled;
-        //     runtimePointStatic[i].gameObject.SetActive(cameraEnable);
-        //     if(cameraEnable)
-        //         runtimePointStatic[i].anchoredPosition = CameraManager.instance.secondCamera.WorldToScreenPoint(runtimePointStaticBind[i].transform.position) * 1920.0f / Screen.width;
-        // }
-        
+        znz.transform.rotation = Quaternion.Lerp(znz.transform.rotation, Quaternion.Euler(0, 0, CameraManager.instance.mainCamera.transform.localEulerAngles.y), Time.deltaTime * 4);
+
+        for (int i = 0; i < runtimePointStatic.Length; i++)
+        {
+            bool cameraEnable = CameraManager.instance.secondCamera.enabled;
+            runtimePointStatic[i].gameObject.SetActive(cameraEnable);
+            if (cameraEnable)
+                runtimePointStatic[i].anchoredPosition = CameraManager.instance.secondCamera.WorldToScreenPoint(runtimePointStaticBind[i].transform.position) * 1920.0f / Screen.width;
+        }
+
     }
 }

+ 3 - 3
Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

@@ -199,19 +199,19 @@ public class YZTLayer : YZTRootLayer
             if (temp.special) {
                 newPoint.layerIDs.Add(0);
                 newPoint.gameObject.SetActive(true);
-                newPoint.transform.localScale = Vector3.one;
+                newPoint.transform.localScale = Vector3.one * 0.8f;
             }
             else
             {
                 newPoint.gameObject.SetActive(false);
-                newPoint.transform.localScale = Vector3.one * 0.6f;
+                newPoint.transform.localScale = Vector3.one * 0.4f;
             }
             int tempI = i;
             newPoint.GetComponent<RectTransform>().SetParent(pointParent);
             newPoint.InitPoint(layerSprite[(int)(temp.type)], temp.name_pri, temp.name);;
             newPoint.layerIDs.Add((int)(temp.type));
             newPoint.bingObj = Instantiate(runtimePointObj).gameObject;
-            newPoint.bingObj.transform.SetParent(shaPan.transform.GetChild(0));
+            newPoint.bingObj.transform.SetParent(shaPan.transform);
             newPoint.bingObj.transform.localEulerAngles = Vector3.zero;
             newPoint.bingObj.transform.localScale = Vector3.one;
             newPoint.bingObj.transform.localPosition = CoordinateConverter.GeoToUGUISmall(temp.longitude, temp.latitude);

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -639,7 +639,7 @@ PlayerSettings:
   webGLTemplate: PROJECT:WaterTemplate
   webGLAnalyzeBuildSize: 0
   webGLUseEmbeddedResources: 0
-  webGLCompressionFormat: 2
+  webGLCompressionFormat: 1
   webGLWasmArithmeticExceptions: 0
   webGLLinkerTarget: 1
   webGLThreadsSupport: 0

Some files were not shown because too many files changed in this diff