lzx 4 dní pred
rodič
commit
f5826ae762

+ 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
+    - _Alpha: 0.6299298
     - _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
+    - _Alpha: 0.372032
     - _AlphaCutoff: 0.5
     - _ColorMask: 0
     - _EnableExternalAlpha: 0

+ 42 - 5
Assets/Res/UI/BoxPanel/BoxPanel.prefab

@@ -218,9 +218,8 @@ RectTransform:
   m_Children:
   - {fileID: 7720912462477243599}
   - {fileID: 5215288793663623655}
-  - {fileID: 6698958863649085951}
-  - {fileID: 4107868657645293525}
   - {fileID: 2204493687573570178}
+  - {fileID: 6698958863649085951}
   m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -321,6 +320,11 @@ MonoBehaviour:
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
+  - key: group
+    gameObject: {fileID: 3194501373201481477}
+    isAssetBundle: 0
+    isList: 0
+    ListCollectorDatas: []
   isAssetBundle: 1
 --- !u!225 &8976664237382821618
 CanvasGroup:
@@ -935,6 +939,7 @@ RectTransform:
   - {fileID: 4133974415825677973}
   - {fileID: 3908211497387841003}
   - {fileID: 1523123446230304984}
+  - {fileID: 4107868657645293525}
   m_Father: {fileID: 7858018693182147813}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -981,16 +986,16 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 4100249672871520735}
-  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: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 7858018693182147813}
+  m_Father: {fileID: 6698958863649085951}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 44.9, y: 21.2}
+  m_AnchoredPosition: {x: -280.1, y: -740.8}
   m_SizeDelta: {x: 94, y: 94}
   m_Pivot: {x: 0, y: 0}
 --- !u!222 &1879604139991815501
@@ -2832,22 +2837,42 @@ PrefabInstance:
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 2826403290849877211, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 3453509600111734819, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 3453509600111734819, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 3860916012489597640, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 3860916012489597640, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 4107622798201289879, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 4107622798201289879, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 5279010819134275556, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 5279010819134275556, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 5535388082515898070, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_Pivot.x
       value: 0.5
@@ -2944,14 +2969,26 @@ PrefabInstance:
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 6704461613023165211, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 6786739748742204170, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 6786739748742204170, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 7824345052355839976, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_Enabled
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 7824345052355839976, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
+      propertyPath: m_SortingLayer
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 9076904407877003826, guid: 50a8cb87d1ad592499b4be5d13ff6049, type: 3}
       propertyPath: m_LocalScale.x
       value: 1

+ 64 - 4
Assets/Res/UI/BoxPanel/GachaPanel.prefab

@@ -512,6 +512,21 @@ MonoBehaviour:
     - gameObject: {fileID: 6301372275407792793}
     - gameObject: {fileID: 3514576898811181058}
     - gameObject: {fileID: 7676295276959900716}
+  - key: Btn_Close
+    gameObject: {fileID: 3357811801516659453}
+    isAssetBundle: 0
+    isList: 0
+    ListCollectorDatas:
+    - gameObject: {fileID: 8460248494035766006}
+    - gameObject: {fileID: 7583756930290804199}
+    - gameObject: {fileID: 8691601371041149407}
+    - gameObject: {fileID: 3161106526278752775}
+    - gameObject: {fileID: 983928321077698655}
+    - gameObject: {fileID: 4493318351616086192}
+    - gameObject: {fileID: 7833803437519831564}
+    - gameObject: {fileID: 6301372275407792793}
+    - gameObject: {fileID: 3514576898811181058}
+    - gameObject: {fileID: 7676295276959900716}
   isAssetBundle: 1
 --- !u!1 &694216056308444776
 GameObject:
@@ -1540,14 +1555,15 @@ GameObject:
   - component: {fileID: 1889193699677240613}
   - component: {fileID: 858017549772346881}
   - component: {fileID: 5023196956268492098}
+  - component: {fileID: 3357811801516659453}
   m_Layer: 0
   m_HasEditorInfo: 1
-  m_Name: myImage
+  m_Name: Btn_Close
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &1889193699677240613
 RectTransform:
   m_ObjectHideFlags: 0
@@ -1588,7 +1604,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_Color: {r: 1, g: 1, b: 1, a: 0.003921569}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -1618,6 +1634,50 @@ MonoBehaviour:
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}
   direction: 0
+--- !u!114 &3357811801516659453
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4167220551134749730}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 5023196956268492098}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &4418083923053840122
 GameObject:
   m_ObjectHideFlags: 0
@@ -1905,7 +1965,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &4894137871019489262
 RectTransform:
   m_ObjectHideFlags: 0

+ 1 - 1
Assets/Resources/Shader/Shader Graphs_ShengShiShader.mat

@@ -66,5 +66,5 @@ Material:
     m_Colors:
     - _mainColor: {r: 0.21314356, g: 1.4060051, b: 2.1517377, a: 0}
     - _off: {r: 0.01, g: 0.01, b: 0, a: 0}
-    - _pos: {r: 0, g: -5, b: -30, a: 0}
+    - _pos: {r: -1.8000001, g: -5.3999996, b: -30, a: 0}
   m_BuildTextureStacks: []

+ 18 - 4
Assets/Scripts/GameUI/UI/BoxPanel/BoxPanel.cs

@@ -122,7 +122,18 @@ namespace Fort23.Mono
             //测试代码
             List<ItemInfo> allIitem = await BoxHelper.OneBox(openBoxConfig.ID);
             if (allIitem != null)
-                GachaPanel.OpenPanel(allIitem, 1, openBoxConfig.ID);
+            {
+                group.gameObject.SetActive(false);
+                await MarskPanel.OpenPanel();
+                fx_ui_chouka.gameObject.SetActive(true);
+                await TimerComponent.Instance.WaitAsync(700);
+                MarskPanel.ClosePanel();
+                GachaPanel gachaPanel = await GachaPanel.OpenPanel(allIitem, 1, openBoxConfig.ID);
+                await gachaPanel.UIClosed();
+                fx_ui_chouka.gameObject.SetActive(false);
+                group.gameObject.SetActive(true);
+            }
+
             UpdateUi();
         }
 
@@ -132,12 +143,15 @@ namespace Fort23.Mono
             List<ItemInfo> allIitem = await BoxHelper.TenBox(openBoxConfig.ID);
             if (allIitem != null)
             {
+                group.gameObject.SetActive(false);
                 await MarskPanel.OpenPanel();
                 fx_ui_chouka.gameObject.SetActive(true);
-                await TimerComponent.Instance.WaitAsync(1000);
-                fx_ui_chouka.gameObject.SetActive(false);
+                await TimerComponent.Instance.WaitAsync(700);
                 MarskPanel.ClosePanel();
-                GachaPanel.OpenPanel(allIitem, 2, openBoxConfig.ID);
+                GachaPanel gachaPanel = await GachaPanel.OpenPanel(allIitem, 2, openBoxConfig.ID);
+                await gachaPanel.UIClosed();
+                fx_ui_chouka.gameObject.SetActive(false);
+                group.gameObject.SetActive(true);
             }
 
 

+ 11 - 0
Assets/Scripts/GameUI/UI/BoxPanel/BoxPanelData.cs

@@ -184,6 +184,17 @@ namespace Fort23.Mono
 	      return _fx_ui_chouka;
 	     }
 	   }
+	  private GameObject _group;
+	  public GameObject group
+	   {
+	   get{
+	      if (_group == null)
+	       {
+	         _group  = GetUIUnit<GameObject>("group"); 
+	       }
+	      return _group;
+	     }
+	   }
 	  #endregion 自定义数据结束 
 	 public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
 	{

+ 8 - 11
Assets/Scripts/GameUI/UI/BoxPanel/GachaPanel.cs

@@ -69,6 +69,7 @@ namespace Fort23.Mono
 
                 UIManager.Instance.HideUIUIPanel<GachaPanel>();
             });
+            Btn_Close.onClick.AddListener(() => { UIManager.Instance.HideUIUIPanel<GachaPanel>(); });
         }
 
         public async override CTask<bool> AsyncInit(object[] uiData)
@@ -126,7 +127,7 @@ namespace Fort23.Mono
             {
                 TenRoot.gameObject.SetActive(true);
                 OneRoot.gameObject.SetActive(false);
-                await TimerComponent.Instance.WaitAsync(600);
+                // await TimerComponent.Instance.WaitAsync(600);
                 for (var i = 0; i < itemInfos.Count; i++)
                 {
                     WidgetItemType2 widgetItem =
@@ -229,18 +230,14 @@ namespace Fort23.Mono
             await base.Close();
         }
 
-        public async static CTask OpenPanel(List<ItemInfo> itemInfos, int type, int configId)
+        public async static CTask<GachaPanel> OpenPanel(List<ItemInfo> itemInfos, int type, int configId)
         {
-            if (UIManager.Instance.GetComponent<GachaPanel>() == null ||
-                UIManager.Instance.GetComponent<GachaPanel>().IsClose)
-            {
-                GachaPanel gachaPanel = await UIManager.Instance.LoadAndOpenPanel<GachaPanel>(null, UILayer.Middle,
-                    uiData: new object[] { itemInfos, type, configId }, isShowBG: true);
-                // await TimerComponent.Instance.WaitAsync(300);
-                gachaPanel.CusstomInit();
-            }
-
+            GachaPanel gachaPanel = await UIManager.Instance.LoadAndOpenPanel<GachaPanel>(null, UILayer.Middle,
+                uiData: new object[] { itemInfos, type, configId }, isShowBG: false);
+            // await TimerComponent.Instance.WaitAsync(300);
+            gachaPanel.CusstomInit();
             AudioManager.Instance.PlayAudio("ui_chouqugongfa.wav");
+            return gachaPanel;
         }
     }
 }

+ 11 - 0
Assets/Scripts/GameUI/UI/BoxPanel/GachaPanelData.cs

@@ -184,6 +184,17 @@ namespace Fort23.Mono
 	      return _root;
 	     }
 	   }
+	  private Button _Btn_Close;
+	  public Button Btn_Close
+	   {
+	   get{
+	      if (_Btn_Close == null)
+	       {
+	         _Btn_Close  = GetUIUnit<Button>("Btn_Close"); 
+	       }
+	      return _Btn_Close;
+	     }
+	   }
 	  #endregion 自定义数据结束 
 	 public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
 	{

+ 7 - 1
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceRestoredPanel.cs

@@ -10,6 +10,7 @@ namespace Fort23.Mono
     public partial class DivineSenceRestoredPanel : UIPanel
     {
         List<DivineSenceRestoredWidget> _divineSenceRestoredWidgets = new List<DivineSenceRestoredWidget>();
+        private TimerEntity _timerEntity;
 
         private void Init()
         {
@@ -69,8 +70,10 @@ namespace Fort23.Mono
 
 
             UpdateText();
+            _timerEntity?.Dispose();
+            _timerEntity = null;
 
-            TimerComponent.Instance.AddTimer(1000, null, int.MaxValue, () => { UpdateText(); });
+            _timerEntity = TimerComponent.Instance.AddTimer(1000, null, int.MaxValue, () => { UpdateText(); });
 
             return await base.AsyncInit(uiData);
         }
@@ -119,6 +122,9 @@ namespace Fort23.Mono
             }
 
             _divineSenceRestoredWidgets.Clear();
+
+            _timerEntity?.Dispose();
+            _timerEntity = null;
             return base.Close();
         }
     }