Browse Source

修改引导对话框

lzx 3 days ago
parent
commit
f07ec6ceb8

+ 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.48589683
+    - _Alpha: 0
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0

+ 2 - 2
Assets/Art/VFX/Materials/UIMat/ui_renwu_lg.mat

@@ -57,13 +57,13 @@ Material:
         m_Offset: {x: 0, y: 0}
     m_Ints: []
     m_Floats:
-    - _Alpha: 0.18092775
+    - _Alpha: 0.209014
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0
     - _MainSpeedU: 0.5
     - _MainSpeedV: 0.5
-    - _MainTexOffsetU: 0.23569512
+    - _MainTexOffsetU: 0.20130575
     - _MainTexOffsetV: 0
     - _MainTilingU: 0.8
     - _MainTilingV: 1

+ 2 - 2
Assets/Res/UI/DivineSence/BossInfoPanel.prefab

@@ -39,7 +39,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: 1200, y: 2670}
+  m_SizeDelta: {x: 750, y: 1624}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &7897761964867798499
 MonoBehaviour:
@@ -2753,7 +2753,7 @@ MonoBehaviour:
   m_MinValue: 0
   m_MaxValue: 1
   m_WholeNumbers: 0
-  m_Value: 0.916
+  m_Value: 1
   m_OnValueChanged:
     m_PersistentCalls:
       m_Calls: []

+ 1 - 1
Assets/Res/UI/DivineSence/DivineSenceRestoredWidget.prefab

@@ -222,7 +222,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 189.53296, y: -49.37755}
-  m_SizeDelta: {x: 0, y: 96.45}
+  m_SizeDelta: {x: 108, y: 96.45}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5304083428607473890
 CanvasRenderer:

+ 34 - 2
Assets/Res/UI/GuidePanel/GuidePanel.prefab

@@ -659,7 +659,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 129, y: -45}
-  m_SizeDelta: {x: 230, y: 0}
+  m_SizeDelta: {x: 230, y: 25}
   m_Pivot: {x: 0.5, y: 0}
 --- !u!222 &8338311249470657121
 CanvasRenderer:
@@ -2724,7 +2724,7 @@ RectTransform:
   m_AnchorMin: {x: 0.5, y: 0}
   m_AnchorMax: {x: 0.5, y: 0}
   m_AnchoredPosition: {x: 3.6313934, y: 20.999634}
-  m_SizeDelta: {x: 265.63, y: 0}
+  m_SizeDelta: {x: 265.63, y: 59}
   m_Pivot: {x: 0.5, y: 0}
 --- !u!222 &3240962251355908592
 CanvasRenderer:
@@ -2985,6 +2985,10 @@ PrefabInstance:
     serializedVersion: 3
     m_TransformParent: {fileID: 6330229592131453682}
     m_Modifications:
+    - target: {fileID: 734780392825207831, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: m_IsActive
+      value: 1
+      objectReference: {fileID: 0}
     - target: {fileID: 734780393184598388, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
       propertyPath: m_Name
       value: GuideHand
@@ -3073,6 +3077,34 @@ PrefabInstance:
       propertyPath: m_LocalEulerAnglesHint.z
       value: 0
       objectReference: {fileID: 0}
+    - target: {fileID: 1255425239809916940, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 5059957099899968773, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: AllComs.Array.size
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 5059957099899968773, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: AllComsStateTypes.Array.size
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 5059957099899968773, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: data.Array.data[0].StateInfos.Array.size
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 5059957099899968773, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: data.Array.data[1].StateInfos.Array.size
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 5059957099899968773, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: data.Array.data[2].StateInfos.Array.size
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 6514837214852521581, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 6928099528430643331, guid: c49f0291e3d46584db5de0cfca5970e2, type: 3}
       propertyPath: m_Enabled
       value: 1

+ 8 - 1
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceRestoredWidget.cs

@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using Core.Audio;
 using Core.Language;
 using Excel2Json;
 using Fort23.Core;
@@ -45,6 +46,7 @@ namespace Fort23.Mono
                         !PlayerManager.Instance.BagController.IsEnough(ShopItemConfig.costItemId,
                             ShopItemConfig.price * 1))
                     {
+                        AudioManager.Instance.PlayAudio("ui_chaozuoshibai.wav");
                         ItemSourcePanel.OpenPanel(ShopItemConfig.costItemId);
                         // TipMessagePanel.OpenTipMessagePanel(829, Vector2.zero);
                         return;
@@ -53,6 +55,7 @@ namespace Fort23.Mono
                     List<ItemInfo> itemInfos = await ShopManger.Instance.BuyItem(ShopItemConfig.ID, 1);
                     if (itemInfos != null)
                     {
+                        AudioManager.Instance.PlayAudio("ui_tycg.wav");
                         //使用道具
                         foreach (var itemInfo in itemInfos)
                         {
@@ -71,6 +74,7 @@ namespace Fort23.Mono
                     }
                     else
                     {
+                      
                         TipMessagePanel.OpenTipMessagePanel(833, Vector2.zero);
                     }
                 }
@@ -79,6 +83,7 @@ namespace Fort23.Mono
                 {
                     if (PlayerManager.Instance.BagController.IsEnough(itemConfig.ID, 1))
                     {
+                        AudioManager.Instance.PlayAudio("ui_tycg.wav");
                         AccountFileInfo.Instance.playerData.divineSensePoint +=
                             itemConfig.associateVlaue[0];
                         PlayerManager.Instance.BagController.DeductItem(itemConfig.ID, 1);
@@ -87,7 +92,9 @@ namespace Fort23.Mono
                     }
                     else
                     {
-                        TipMessagePanel.OpenTipMessagePanel(10324, Vector2.zero);
+                        AudioManager.Instance.PlayAudio("ui_chaozuoshibai.wav");
+                        ItemSourcePanel.OpenPanel(itemConfig.ID);
+                        // TipMessagePanel.OpenTipMessagePanel(10324, Vector2.zero);
                     }
                 }
 

+ 34 - 6
Assets/Scripts/GameUI/UI/GuidePanel/PlayerGuideManager.cs

@@ -510,8 +510,6 @@ namespace Fort23.Mono
         {
             curPhase = 0;
             curStep = 0;
-            
-           
         }
 
 
@@ -747,12 +745,12 @@ namespace Fort23.Mono
 
             SetFingerPos(fPos);
 
-            SetDialogPos(dPos);
 
             SetBlackBaseVisiable(true);
 
             SetBlackAlpha(guideConfig.blackAlpha);
             ShowDialogBox(action, str);
+            SetDialogPos(dPos);
             await dialogBox.SetDiTex(guideConfig, guideConfig.SpeakerImage);
             // UIManager.Instance.SetEventSystemEnable(true);
         }
@@ -984,8 +982,39 @@ namespace Fort23.Mono
             if (dPos != null)
             {
                 Vector3 pos = new Vector3(dPos[0], dPos[1], 0);
-                float ratio = Screen.width / 750f;
-                pos.x *= ratio;
+                // float ratio = Screen.width / 750f;
+                // pos.x *= ratio;
+
+                float y = dialogBox.MessageBG.GetComponent<RectTransform>().sizeDelta.y;
+
+                float maxY = UIManager.Instance.GetComponent<GuidePanel>().transform.sizeDelta.y / 2;
+                float my2 = dialogBox.MessageBG.GetComponent<RectTransform>().sizeDelta.y / 2;
+
+
+                if (pos.y > maxY - my2)
+                {
+                    pos.y = maxY - my2;
+                }
+
+                if (pos.y < my2 - maxY)
+                {
+                    pos.y = my2 - maxY;
+                }
+
+
+                float maxx = UIManager.Instance.GetComponent<GuidePanel>().transform.sizeDelta.x / 2;
+                float mx2 = dialogBox.MessageBG.GetComponent<RectTransform>().sizeDelta.x / 2;
+
+                if (pos.x > maxx - mx2)
+                {
+                    pos.x = maxx - mx2;
+                }
+
+                if (pos.x < mx2 - maxx)
+                {
+                    pos.x = mx2 - maxx;
+                }
+
                 dialogBox.MessageBG.localPosition = pos;
             }
             else
@@ -1215,7 +1244,6 @@ namespace Fort23.Mono
         /// </summary>
         public void StepInit()
         {
-           
             _customVectorTween?.Kill();
             _customVectorTween = null;
             UIManager.Instance.GetComponent<GuidePanel>().transform.SetAsLastSibling();

+ 5 - 5
Assets/Scripts/GameUI/UI/TowerPanel/TowerPanel.cs

@@ -147,11 +147,11 @@ namespace Fort23.Mono
                 await UIManager.Instance.CreateGComponent<TowerLevelWidget>(null, ContentRoot);
             // woc1.OnClick = OnClick;
             woc1.CustomInit(_towerData, towerInfoConfigps[towerInfoConfigps.Count - 1 - currInsex]);
-            if (towerInfoConfigps[towerInfoConfigps.Count - 1 - currInsex].ID == ulockId)
-            {
-                OnClick(woc1);
-                // woc1.OnPointerClick();
-            }
+            // if (towerInfoConfigps[towerInfoConfigps.Count - 1 - currInsex].ID == ulockId)
+            // {
+            //     OnClick(woc1);
+            //     // woc1.OnPointerClick();
+            // }
 
             return woc1;
         }