Explorar o código

Merge branch 'master' of http://192.168.123.2:3000/ck/XiuXianGame

lzx hai 2 días
pai
achega
e8877dffa1

+ 1 - 1
Assets/Art/VFX/Materials/UIMat/ui_ob_yindao_glow_add.mat

@@ -57,7 +57,7 @@ Material:
         m_Offset: {x: 0, y: 0}
     m_Ints: []
     m_Floats:
-    - _Alpha: 0.9256576
+    - _Alpha: 0
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0

+ 1 - 1
Assets/Art/VFX/Materials/UIMat/ui_ob_yindao_quan.mat

@@ -57,7 +57,7 @@ Material:
         m_Offset: {x: 0, y: 0}
     m_Ints: []
     m_Floats:
-    - _Alpha: 0.7075048
+    - _Alpha: 0
     - _AlphaCutoff: 0.5
     - _ColorMask: 0
     - _EnableExternalAlpha: 0

+ 17 - 1
Assets/Res/UI/CombatPanel.prefab

@@ -940,6 +940,7 @@ GameObject:
   m_Component:
   - component: {fileID: 4287798501111193387}
   - component: {fileID: 8588517758620161246}
+  - component: {fileID: 6678406076135109507}
   m_Layer: 5
   m_HasEditorInfo: 1
   m_Name: ' BossHpRoot'
@@ -992,6 +993,21 @@ MonoBehaviour:
   m_Spacing: {x: 0, y: 0}
   m_Constraint: 0
   m_ConstraintCount: 2
+--- !u!114 &6678406076135109507
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1340706786225753752}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 7e884cfd2aa14b98baf1ef3f9d1fc5b0, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  offsetX: 0
+  anchorPointType: 2
+  isUpdate: 0
 --- !u!1 &1343676762713764609
 GameObject:
   m_ObjectHideFlags: 0
@@ -9725,7 +9741,7 @@ RectTransform:
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 750, y: 1624}
+  m_SizeDelta: {x: 1170, y: 2532}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &4159330424245520485
 MonoBehaviour:

+ 20 - 2
Assets/Scripts/Core/UI/UTool/UIAdapter/UIAdapterForSafeArea.cs

@@ -9,6 +9,8 @@ namespace Utility.UIAdapter
         {
             Left,
             Right,
+            Up,
+            Down,
         }
 
         [Header("固定偏移")] public float offsetX;
@@ -52,7 +54,23 @@ namespace Utility.UIAdapter
             var safeArea = Screen.safeArea;
             float ratio = _canvasScaler.referenceResolution.y * _canvasScaler.matchWidthOrHeight / Screen.height -
                           _canvasScaler.referenceResolution.x * (_canvasScaler.matchWidthOrHeight - 1) / Screen.width;
-            if (anchorPointType == AnchorPointType.Left)
+            if (anchorPointType == AnchorPointType.Up)
+            {
+                if (safeArea.yMin > 0)
+                {
+                    if (offsetX > 0)
+                    {
+                        myRectTransform.anchoredPosition =
+                            new Vector2(anchoredPosition.x , anchoredPosition.y- offsetX);
+                    }
+                    else
+                    {
+                        myRectTransform.anchoredPosition =
+                            new Vector2(anchoredPosition.x , anchoredPosition.y- safeArea.yMin * ratio);
+                    }
+                }
+            }
+            else if (anchorPointType == AnchorPointType.Left)
             {
                 if (safeArea.xMin > 0)
                 {
@@ -68,7 +86,7 @@ namespace Utility.UIAdapter
                     }
                 }
             }
-            else
+            else if (anchorPointType == AnchorPointType.Right)
             {
                 if (safeArea.xMin > 0)
                 {