浏览代码

再交一版效果

wartheking 9 月之前
父节点
当前提交
c56cf05397

+ 1 - 1
Assets/Art/Material/Effect/DiKuaiFenQu_DongBu.mat

@@ -95,7 +95,7 @@ Material:
     - _ZWrite: 0
     m_Colors:
     - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
-    - _Color: {r: 0.2783019, g: 0.59888625, b: 1, a: 0.15686275}
+    - _Color: {r: 1, g: 0, b: 0.10302067, a: 0.59607846}
     - _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
     - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}

+ 1 - 1
Assets/Art/Material/Effect/DiKuaiFenQu_XiBu.mat

@@ -95,7 +95,7 @@ Material:
     - _ZWrite: 0
     m_Colors:
     - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
-    - _Color: {r: 0.2783019, g: 0.59888625, b: 1, a: 0.15686275}
+    - _Color: {r: 0.49255624, g: 1, b: 0.27843142, a: 0.7019608}
     - _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
     - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}

+ 1 - 1
Assets/Art/Material/Effect/DiKuaiFenQu_ZhongBu.mat

@@ -95,7 +95,7 @@ Material:
     - _ZWrite: 0
     m_Colors:
     - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
-    - _Color: {r: 0.2783019, g: 0.59888625, b: 1, a: 0.15686275}
+    - _Color: {r: 1, g: 0.85159767, b: 0, a: 0.65882355}
     - _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
     - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}

+ 83 - 4
Assets/Prefabs/MiniMap.prefab

@@ -25,7 +25,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 249304407}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: -0.94083595, y: -2.5429688, z: -0.58984375}
+  m_LocalPosition: {x: 5.579164, y: -1.671875, z: -0.58984375}
   m_LocalScale: {x: 1.6732641, y: 1.6732641, z: 0.9989637}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -201,7 +201,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 3793048173667531158}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: -11.557151, y: -8.8046875, z: 0}
+  m_LocalPosition: {x: -5.037151, y: -7.9335938, z: 0}
   m_LocalScale: {x: 13.359, y: 13.359, z: 13.359}
   m_ConstrainProportionsScale: 1
   m_Children: []
@@ -250,7 +250,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 3851146091059575939}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: -18.28, y: -9.660156, z: -0.4000244}
+  m_LocalPosition: {x: -11.76, y: -8.7890625, z: -0.4000244}
   m_LocalScale: {x: 6.7, y: 6.7, z: 6.7}
   m_ConstrainProportionsScale: 1
   m_Children: []
@@ -423,7 +423,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 7033161969292257526}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: -11.557151, y: -8.8046875, z: -0.2000122}
+  m_LocalPosition: {x: -5.037151, y: -7.9335938, z: -0.2000122}
   m_LocalScale: {x: 13.3407, y: 13.3407, z: 13.3407}
   m_ConstrainProportionsScale: 1
   m_Children: []
@@ -488,6 +488,7 @@ Transform:
   - {fileID: 1829979977482383576}
   - {fileID: 1216517146}
   - {fileID: 249304408}
+  - {fileID: 5621129756599565973}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -624,3 +625,81 @@ Transform:
   m_Father: {fileID: 1644283074}
   m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1001 &1309167466
+PrefabInstance:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_Modification:
+    m_TransformParent: {fileID: 7069582396450853087}
+    m_Modifications:
+    - target: {fileID: 4992683391574256453, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_Name
+      value: DiKuaiFenQu
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_RootOrder
+      value: 12
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalScale.x
+      value: 1.7
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalScale.y
+      value: 1.7
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalScale.z
+      value: 1.7
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalPosition.x
+      value: -23.8
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalPosition.y
+      value: -23.6
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: -1.4653931
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalRotation.w
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalRotation.x
+      value: -0.007853894
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalRotation.y
+      value: -0.9999692
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalRotation.z
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.y
+      value: -180
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_LocalEulerAnglesHint.z
+      value: 0.9
+      objectReference: {fileID: 0}
+    - target: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+      propertyPath: m_ConstrainProportionsScale
+      value: 1
+      objectReference: {fileID: 0}
+    m_RemovedComponents: []
+  m_SourcePrefab: {fileID: 100100000, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+--- !u!4 &5621129756599565973 stripped
+Transform:
+  m_CorrespondingSourceObject: {fileID: 5621129755424649727, guid: 466bb753b62a3ff4e984a9a361241e70, type: 3}
+  m_PrefabInstance: {fileID: 1309167466}
+  m_PrefabAsset: {fileID: 0}

+ 5 - 5
Assets/Prefabs/UI/XHYZT/YZT.prefab

@@ -16799,8 +16799,8 @@ RectTransform:
   m_Father: {fileID: 46367777035501093}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 2, y: 0}
   m_SizeDelta: {x: 359.3262, y: 0}
   m_Pivot: {x: 0, y: 1}
@@ -19159,9 +19159,9 @@ RectTransform:
   m_Father: {fileID: 46367777035501093}
   m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 2, y: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 2, y: -350}
   m_SizeDelta: {x: 359.3262, y: 0}
   m_Pivot: {x: 0, y: 1}
 --- !u!222 &46367776433284835

文件差异内容过多而无法显示
+ 98 - 1
Assets/Scene 1.unity


+ 19 - 7
Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

@@ -128,6 +128,7 @@ public class YZTLayer : YZTRootLayer
 
     public RectTransform layerInfo;
     public Button layerInfoExitBtn;
+    public Button[] layerInfoBtns;
 
     public List<int> cancelLayer = new List<int>();
 
@@ -329,15 +330,12 @@ public class YZTLayer : YZTRootLayer
 
     void InitLayerInfo() {
 
-        Button[] btns = layerInfo.GetComponentsInChildren<Button>();
-        for (int i = 0; i < btns.Length - 2; i++) {
+        layerInfoBtns = layerInfo.GetComponentsInChildren<Button>();
+        for (int i = 0; i < layerInfoBtns.Length - 2; i++) {
             int temp = i;
-            btns[i].onClick.AddListener(() =>
+            layerInfoBtns[i].onClick.AddListener(() =>
             {
-                bool active = btns[temp].GetComponent<CanvasGroup>().alpha > 0.5f;
-                btns[temp].GetComponent<CanvasGroup>().alpha = active ? 0.5f : 1.0f;
-                bool newActive = !active;
-                ChangeRuntimeLayer(temp, newActive);
+                RunTimeLayerClick(temp);
             });
         }
 
@@ -348,6 +346,14 @@ public class YZTLayer : YZTRootLayer
         {
             layerInfo.gameObject.SetActive(false);
         });
+        
+    }
+
+    void RunTimeLayerClick(int temp) {
+        bool active = layerInfoBtns[temp].GetComponent<CanvasGroup>().alpha > 0.5f;
+        layerInfoBtns[temp].GetComponent<CanvasGroup>().alpha = active ? 0.5f : 1.0f;
+        bool newActive = !active;
+        ChangeRuntimeLayer(temp, newActive);
     }
 
     void LeftBtnClick(int index,bool record = true) {
@@ -531,6 +537,12 @@ public class YZTLayer : YZTRootLayer
             };
             runtimePointLib.Add(newPoint);
         }
+        RunTimeLayerClick(0);
+        RunTimeLayerClick(1);
+        RunTimeLayerClick(2);
+        RunTimeLayerClick(3);
+        RunTimeLayerClick(4);
+        RunTimeLayerClick(5);
     }
 
     int FindIndexByLayerUnitName(string name) {

部分文件因为文件数量过多而无法显示