瀏覽代碼

修改一些bug,补充3d内容

wartheking 15 小時之前
父節點
當前提交
3f2b5a2f30

+ 22 - 0
Assets/Prefabs/UI/Item/ZhaMenIcon.prefab

@@ -178,6 +178,7 @@ GameObject:
   - component: {fileID: 3405379800184817410}
   - component: {fileID: 9076946353492734133}
   - component: {fileID: 1123870414268019485}
+  - component: {fileID: 4498810429199108522}
   m_Layer: 5
   m_Name: Tint
   m_TagString: Untagged
@@ -284,6 +285,27 @@ MonoBehaviour:
   m_ChildScaleWidth: 1
   m_ChildScaleHeight: 1
   m_ReverseArrangement: 0
+--- !u!223 &4498810429199108522
+Canvas:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5515461222174838467}
+  m_Enabled: 1
+  serializedVersion: 3
+  m_RenderMode: 2
+  m_Camera: {fileID: 0}
+  m_PlaneDistance: 100
+  m_PixelPerfect: 0
+  m_ReceivesEvents: 1
+  m_OverrideSorting: 1
+  m_OverridePixelPerfect: 0
+  m_SortingBucketNormalizedSize: 0
+  m_AdditionalShaderChannelsFlag: 0
+  m_SortingLayerID: 0
+  m_SortingOrder: 2
+  m_TargetDisplay: 0
 --- !u!1 &8445803138219866511
 GameObject:
   m_ObjectHideFlags: 0

+ 2 - 2
Assets/Prefabs/UI/XHYZT/GCJK.prefab

@@ -1186,7 +1186,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 1, y: 0}
   m_AnchorMax: {x: 1, y: 0}
-  m_AnchoredPosition: {x: -503.63, y: 116.7}
+  m_AnchoredPosition: {x: -503.63, y: 64.52417}
   m_SizeDelta: {x: 127.0559, y: 39.4166}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3842554512023480712
@@ -3651,7 +3651,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &1132827219479338585
 RectTransform:
   m_ObjectHideFlags: 0

+ 2 - 2
Assets/Prefabs/UI/XHYZT/XHDD.prefab

@@ -7099,8 +7099,8 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 68, y: -15.5}
-  m_SizeDelta: {x: 56, y: 24}
+  m_AnchoredPosition: {x: 92.91589, y: -15.5}
+  m_SizeDelta: {x: 105.8318, y: 24}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3891630345453428926
 CanvasRenderer:

文件差異過大導致無法顯示
+ 101 - 80
Assets/Scene 1.unity


+ 2 - 2
Assets/Scripts/HttpHelper.cs

@@ -104,14 +104,14 @@ public class HttpHelper : MonoBehaviour
             InitGCJKData1h();
         }
 
-        if (GlobalData.pageIndex == PageIndex.Page1)
+        if (GlobalData.pageIndex == PageIndex.Page1 || GlobalData.pageIndex == PageIndex.Page3)
         {
             Debug.Log("HttpInitXHDDData");
             //可以并行,无需等待
             InitXHDDData();
         }
 
-        if (GlobalData.pageIndex == PageIndex.Page1)
+        if (GlobalData.pageIndex == PageIndex.Page1 || GlobalData.pageIndex == PageIndex.Page3)
         {
             Debug.Log("HttpInitRKZYData");
             //可以并行,无需等待

+ 5 - 0
Assets/Scripts/StaticImportant.cs

@@ -83,6 +83,8 @@ public class StaticImportant : MonoBehaviour
 
     public void Show()
     {
+        if (waitCreatModels)
+            return;
         if (onShow) return;
         onShow = true;
         for (int i = 0; i < models.Count; i++)
@@ -95,6 +97,8 @@ public class StaticImportant : MonoBehaviour
 
     public void Hide()
     {
+        if (waitCreatModels)
+            return;
         if (!onShow) return;
         onShow = false;
         for (int i = 0; i < models.Count; i++)
@@ -277,6 +281,7 @@ public class StaticImportant : MonoBehaviour
         if (extraParticle != null) { 
             models.Add(extraParticle);
         }
+        //Debug.LogWarning("download:" + onShow + this.gameObject.name);
         Hide();
         www.Dispose();
     }

+ 2 - 0
Assets/Scripts/StaticLod.cs

@@ -82,6 +82,7 @@ public class StaticLod : MonoBehaviour
             {
                 if (interVal < 0.0f)
                 {
+                    
                     interVal = 0.8f;
                     for (int i = 0; i < staticImportants.Count; i++)
                     {
@@ -91,6 +92,7 @@ public class StaticLod : MonoBehaviour
                         }
                         else
                         {
+//Debug.Log(staticImportants[i].name);
                             staticImportants[i].Hide();
                         }
                     }

+ 9 - 4
Assets/Scripts/UI/UIView/3D/ThreeDNav.cs

@@ -17,11 +17,12 @@ public class ThreeDNav : MonoBehaviour
 
     public RectTransform znz;
 
+    public GCJKLayer gCJK;
     private void Start()
     {
         CameraManager.SwitchCamera(0);
         InitButton();
-        StaticLod.instance.OnFoucusStatic("Bird0");
+        StaticLod.instance.OnFoucusStatic("TaoKou");
     }
     void InitButton()
     {
@@ -58,12 +59,16 @@ public class ThreeDNav : MonoBehaviour
                 {
                     layers[index].gameObject.SetActive(true);
                 }
-                if (index == 1)
+                if (index == 4)
                 {
                     StaticLod.instance.OnFoucusStatic("Bird0");
                 }
-                else {
-
+                else if (index == 1)
+                {
+                    gCJK.OnBuYuanClick();
+                }
+                else
+                {
                     StaticLod.instance.OnFoucusStatic("TaoKou");
                 }
             });

+ 15 - 12
Assets/Scripts/UI/UIView/GCJK/GCJKLayer.cs

@@ -283,19 +283,22 @@ public class GCJKLayer : YZTRootLayer
         _shuiWeiHistoryPanel.Init();
         _shuiWeiHistoryPanel.gameObject.SetActive(false);
 
-        buyuanBtn.onClick.AddListener(() =>
-        {
-            buyuanBtn.GetComponent<CanvasGroup>().alpha = 1f;
-            taokouBtn.GetComponent<CanvasGroup>().alpha = 0.5f;
-            SetCurrentDataToPanel(0);
-        });
+        buyuanBtn.onClick.AddListener(OnBuYuanClick);
 
-        taokouBtn.onClick.AddListener(() =>
-        {
-            buyuanBtn.GetComponent<CanvasGroup>().alpha = 0.5f;
-            taokouBtn.GetComponent<CanvasGroup>().alpha = 1f;
-            SetCurrentDataToPanel(1);
-        });
+        taokouBtn.onClick.AddListener(OnTaoKouClick);
+    }
+
+    public void OnBuYuanClick() {
+        buyuanBtn.GetComponent<CanvasGroup>().alpha = 1f;
+        taokouBtn.GetComponent<CanvasGroup>().alpha = 0.5f;
+        SetCurrentDataToPanel(0);
+    }
+
+    public void OnTaoKouClick()
+    {
+        buyuanBtn.GetComponent<CanvasGroup>().alpha = 0.5f;
+        taokouBtn.GetComponent<CanvasGroup>().alpha = 1f;
+        SetCurrentDataToPanel(1);
     }
 
     private async void OnEnable()

部分文件因文件數量過多而無法顯示