Browse Source

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

zg 5 days ago
parent
commit
fa8dabd291

+ 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.99681973
+    - _Alpha: 0.7701642
     - _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.99363846
+    - _Alpha: 0.58696043
     - _AlphaCutoff: 0.5
     - _ColorMask: 0
     - _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.20311499
+    - _Alpha: 0.23122954
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0
     - _MainSpeedU: 0.5
     - _MainSpeedV: 0.5
-    - _MainTexOffsetU: 0.20839107
+    - _MainTexOffsetU: 0.17518914
     - _MainTexOffsetV: 0
     - _MainTilingU: 0.8
     - _MainTilingV: 1

+ 5 - 23
Assets/Res/UI/ShopPanel/ShopItemWidgetType2.prefab

@@ -38,7 +38,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 196.9, y: -43.4515}
-  m_SizeDelta: {x: 0, y: 96.45}
+  m_SizeDelta: {x: 108, y: 96.45}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5356034030161481726
 CanvasRenderer:
@@ -363,31 +363,13 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   data:
-  - StateInfos:
-    - Target: {fileID: 0}
-      UIStateV4Types: 40000000
-      UIStateV4Datas:
-      - {x: 0.6, y: 0.49803925, z: 0.37254903, w: 1}
-      UIStateStrTypes: 
-      UIStateStrDatas: []
-  - StateInfos:
-    - Target: {fileID: 0}
-      UIStateV4Types: 40000000
-      UIStateV4Datas:
-      - {x: 0.6, y: 0.49803925, z: 0.37254903, w: 1}
-      UIStateStrTypes: 
-      UIStateStrDatas: []
-  - StateInfos:
-    - Target: {fileID: 0}
-      UIStateV4Types: 40000000
-      UIStateV4Datas:
-      - {x: 0.72156864, y: 0.5882353, z: 0.30588236, w: 1}
-      UIStateStrTypes: 
-      UIStateStrDatas: []
+  - StateInfos: []
+  - StateInfos: []
+  - StateInfos: []
   AllComs:
   - {fileID: 0}
   AllComsStateTypes: 40000000
-  CurrIndex: 0
+  CurrIndex: 2
 --- !u!1 &2501408855436190870
 GameObject:
   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.0000009536743, g: -5, b: -30, a: 0}
+    - _pos: {r: -1.8000001, g: -5.3999996, b: -30, a: 0}
   m_BuildTextureStacks: []

+ 2 - 1
Assets/Scripts/GameLogic/Player/SummonManager.cs

@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using Excel2Json;
+using Fort23.Core;
 using Fort23.UTool;
 using GameLogic.Bag;
 using UnityEngine;
@@ -58,7 +59,7 @@ namespace GameLogic.Player
             AccountFileInfo.Instance.SavePlayerData();
         }
 
-        public List<ItemInfo> Summon(int id, int count)
+        public async CTask<List<ItemInfo>> Summon(int id, int count)
         {
             AccountFileInfo.SummonData summonData = summonDataMap[id];
             OpenBoxConfig openBoxConfig = ConfigComponent.Instance.Get<OpenBoxConfig>(summonData.id);

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

@@ -22,41 +22,20 @@ namespace Fort23.Mono
             if (summonData.tenFreeCount < openBoxConfig.oneConsumeFreePara_1[1] &&
                 PlayerManager.Instance.serverTime >= summonData.nextTenFreeTime)
             {
-                return PlayerManager.Instance.SummonManager.Summon(configId, 10);
+                return await PlayerManager.Instance.SummonManager.Summon(configId, 10);
             }
             else
             {
-                if (openBoxConfig.CostItemID == 1007)
+                //验证道具是否足够
+                if (openBoxConfig.CostItemID != 1007 && !PlayerManager.Instance.BagController.IsEnough(
+                        openBoxConfig.CostItemID,
+                        openBoxConfig.oneConsume))
                 {
-#if UNITY_ANDROID && !UNITY_EDITOR&& Taptap
-                      if (TakuSDKManager.Instance.IsReady())
-                    {
-                        if (!await TakuSDKManager.Instance.ShowAutoAd())
-                        {
-                            return null;
-                        }
-                    }
-                    else
-                    {
-                        return null;
-                    }
-#endif
-                    return PlayerManager.Instance.SummonManager.Summon(configId, 10);
-                }
-                else
-                {
-                    //验证道具是否足够
-                    if (PlayerManager.Instance.BagController.IsEnough(openBoxConfig.CostItemID,
-                            openBoxConfig.tenConsume))
-                    {
-                        return PlayerManager.Instance.SummonManager.Summon(configId, 10);
-                    }
-                    else
-                    {
-                        ItemSourcePanel.OpenPanel(openBoxConfig.CostItemID);
-                        return null;
-                    }
+                    ItemSourcePanel.OpenPanel(openBoxConfig.CostItemID);
+                    return null;
                 }
+
+                return await PlayerManager.Instance.SummonManager.Summon(configId, 10);
             }
         }
 
@@ -68,41 +47,20 @@ namespace Fort23.Mono
             if (summonData.oneFreeCount < openBoxConfig.oneConsumeFreePara[1] &&
                 PlayerManager.Instance.serverTime >= summonData.nextOneFreeTime)
             {
-                return PlayerManager.Instance.SummonManager.Summon(configId, 1);
+                return await PlayerManager.Instance.SummonManager.Summon(configId, 1);
             }
             else
             {
-                if (openBoxConfig.CostItemID == 1007)
+                //验证道具是否足够
+                if (openBoxConfig.CostItemID != 1007 && !PlayerManager.Instance.BagController.IsEnough(
+                        openBoxConfig.CostItemID,
+                        openBoxConfig.oneConsume))
                 {
-#if UNITY_ANDROID && !UNITY_EDITOR && Taptap
-                    if (TakuSDKManager.Instance.IsReady())
-                    {
-                        if (!await TakuSDKManager.Instance.ShowAutoAd())
-                        {
-                            return null;
-                        }
-                    }
-                    else
-                    {
-                        return null;
-                    }
-#endif
-                    return PlayerManager.Instance.SummonManager.Summon(configId, 1);
-                }
-                else
-                {
-                    //验证道具是否足够
-                    if (PlayerManager.Instance.BagController.IsEnough(openBoxConfig.CostItemID,
-                            openBoxConfig.oneConsume))
-                    {
-                        return PlayerManager.Instance.SummonManager.Summon(configId, 1);
-                    }
-                    else
-                    {
-                        ItemSourcePanel.OpenPanel(openBoxConfig.CostItemID);
-                        return null;
-                    }
+                    ItemSourcePanel.OpenPanel(openBoxConfig.CostItemID);
+                    return null;
                 }
+
+                return await PlayerManager.Instance.SummonManager.Summon(configId, 1);
             }
         }
     }

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

@@ -57,20 +57,21 @@ namespace Fort23.Mono
 
         public override void AddButtonEvent()
         {
-            tenButton.onClick.AddListener(() =>
+            tenButton.onClick.AddListener(async() =>
             {
 #if UNITY_ANDROID && !UNITY_EDITOR&& Taptap
-                     if (TakuSDKManager.Instance.IsReady())
-                    {
-                        if (!await TakuSDKManager.Instance.ShowAutoAd())
-                        {
-                            return null;
-                        }
-                    }
-                    else
+                      if (TakuSDKManager.Instance.IsReady())
+                {
+                    bool isOK = await TakuSDKManager.Instance.ShowAutoAd();
+                    if (!isOK)
                     {
-                        return null;
+                        return;
                     }
+                }
+                else
+                {
+                    return;
+                }
 #endif
 
                 tenButton.gameObject.SetActive(false);

+ 1 - 1
Assets/Scripts/GameUI/UI/HeroInformationPanel/CaveMainPanel.cs

@@ -47,7 +47,7 @@ namespace Fort23.Mono
 
 		public override CTask LoseFocus()
 		{
-			TitlePanel.ClosePanel();
+			// TitlePanel.ClosePanel();
 			return base.LoseFocus();
 		}
 

+ 4 - 0
Assets/Scripts/GameUI/UI/ShopPanel/ShopBoxWidget.cs

@@ -111,6 +111,10 @@ namespace Fort23.Mono
             List<ItemInfo> allIitem = await BoxHelper.TenBox(openBoxConfig.ID);
             if (allIitem != null)
                 ShopGachaPanel.OpenPanel(allIitem, 2, openBoxConfig.ID);
+            else
+            {
+                LogTool.Error("失败1");
+            }
 
             UpdateUi();
         }

+ 12 - 10
Assets/Scripts/GameUI/UI/ShopPanel/ShopGachaPanel.cs

@@ -51,20 +51,22 @@ namespace Fort23.Mono
 
         public override void AddButtonEvent()
         {
-            Btn_ShuangBei.onClick.AddListener(() =>
+            Btn_ShuangBei.onClick.AddListener(async () =>
             {
 #if UNITY_ANDROID && !UNITY_EDITOR&& Taptap
-                      if (TakuSDKManager.Instance.IsReady())
-                    {
-                        if (!await TakuSDKManager.Instance.ShowAutoAd())
-                        {
-                            return null;
-                        }
-                    }
-                    else
+                if (TakuSDKManager.Instance.IsReady())
+                {
+                    bool isOK = await TakuSDKManager.Instance.ShowAutoAd();
+                    if (!isOK)
                     {
-                        return null;
+                        return;
                     }
+                }
+                else
+                {
+                    return;
+                }
+
 #endif
                 float beLv =
                     Utility.UtilTools.GetRandomByWeight(_openBoxConfig.betPara1.ToList(), _openBoxConfig.betPara2);

+ 39 - 15
Assets/Scripts/GameUI/UI/ShopPanel/ShopPanel.cs

@@ -22,6 +22,8 @@ namespace Fort23.Mono
 
         List<ShopBtnWidget> _shopBtnWidgets = new List<ShopBtnWidget>();
 
+        private int shopId;
+
         private void Init()
         {
             isAddStack = true;
@@ -43,6 +45,30 @@ namespace Fort23.Mono
         public override CTask GetFocus()
         {
             AppBarPanel.OpenPanel(this);
+            if (currentSelectedShopBtnWidget == null)
+            {
+                foreach (var shopBtnWidget in _shopBtnWidgets)
+                {
+                    if (shopBtnWidget.ShopGroupConfig.ID == shopId)
+                    {
+                        currentSelectedShopBtnWidget = shopBtnWidget;
+                        break;
+                    }
+                }
+
+                if (currentSelectedShopBtnWidget == null)
+                {
+                    _shopBtnWidgets[0]?.OnPointerClick();
+                }
+                else
+                {
+                    currentSelectedShopBtnWidget.OnPointerClick();
+                }
+            }
+            else
+            {
+                currentSelectedShopBtnWidget.OnPointerClick();
+            }
 
             return base.GetFocus();
         }
@@ -61,7 +87,7 @@ namespace Fort23.Mono
 
         public async override CTask<bool> AsyncInit(object[] uiData)
         {
-            int shopId = int.Parse(uiData[0].ToString());
+            shopId = int.Parse(uiData[0].ToString());
             List<ShopGroupConfig> shopGroupConfigs = ConfigComponent.Instance.GetAll<ShopGroupConfig>().ToList();
             shopGroupConfigs.Sort(Sort);
             foreach (var shopGroupConfig in shopGroupConfigs)
@@ -73,24 +99,22 @@ namespace Fort23.Mono
                 shopBtnWidget.CustomInit(shopGroupConfig);
                 shopBtnWidget.OnClick = OnClick;
                 _shopBtnWidgets.Add(shopBtnWidget);
-                if (shopGroupConfig.ID == shopId)
-                {
-                    currentSelectedShopBtnWidget = shopBtnWidget;
-                }
+                // if (shopGroupConfig.ID == shopId)
+                // {
+                //     currentSelectedShopBtnWidget = shopBtnWidget;
+                // }
             }
 
             ShopBtnContent.GetComponent<UIToggleList>().GetChildObj();
-            if (currentSelectedShopBtnWidget == null)
-            {
-                _shopBtnWidgets[0]?.OnPointerClick();
-            }
-            else
-            {
-                currentSelectedShopBtnWidget.OnPointerClick();
-            }
-
+            // if (currentSelectedShopBtnWidget == null)
+            // {
+            //     _shopBtnWidgets[0]?.OnPointerClick();
+            // }
+            // else
+            // {
+            //     currentSelectedShopBtnWidget.OnPointerClick();
+            // }
 
-            // isPauseCombat = uiData[0] as bool? == true;
             return await base.AsyncInit(uiData);
         }