浏览代码

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

zg 4 天之前
父节点
当前提交
a5a2471569

+ 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.5627777
+    - _Alpha: 0.14519864
     - _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.0010102458
+    - _Alpha: 0
     - _AlphaCutoff: 0.5
     - _ColorMask: 0
     - _EnableExternalAlpha: 0

+ 1 - 1
Assets/Res/Font/kt.ttf.meta

@@ -3,7 +3,7 @@ guid: Wn8XvX6kUH3pLjBmYi1wegjjx8CkmJfa3tUqqXgoyoTR6oi1wYbm1JbUs1dX
 TrueTypeFontImporter:
   externalObjects: {}
   serializedVersion: 4
-  fontSize: 24
+  fontSize: 40
   forceTextureCase: -2
   characterSpacing: 0
   characterPadding: 1

+ 1 - 1
Assets/Res/Font/wryh.ttf.meta

@@ -3,7 +3,7 @@ guid: XSga5y+oACgwGhcXPONrt+0KTpbG200wHa7pPXUUCJUJCjd1rahHpYduVgqE
 TrueTypeFontImporter:
   externalObjects: {}
   serializedVersion: 4
-  fontSize: 24
+  fontSize: 40
   forceTextureCase: -2
   characterSpacing: 0
   characterPadding: 1

+ 163 - 1
Assets/Res/UI/CombatPuasePanel.prefab

@@ -1,5 +1,165 @@
 %YAML 1.1
 %TAG !u! tag:yousandi.cn,2023:
+--- !u!1 &107178414527748203
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 8799930228682830085}
+  - component: {fileID: 2879676423632365990}
+  - component: {fileID: 4448228091206733258}
+  m_Layer: 5
+  m_HasEditorInfo: 1
+  m_Name: Text (Legacy)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &8799930228682830085
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 107178414527748203}
+  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: 2128051441581476715}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 0, y: -62.2}
+  m_SizeDelta: {x: 160, y: 30}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &2879676423632365990
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 107178414527748203}
+  m_CullTransparentMesh: 1
+--- !u!114 &4448228091206733258
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 107178414527748203}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: bb5b55cc5861a4951990bcc1caccc50e, type: 3}
+    m_FontSize: 24
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 2
+    m_MaxSize: 40
+    m_Alignment: 4
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: "\u7EE7\u7EED"
+--- !u!1 &755770767857381618
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 3648111293099433639}
+  - component: {fileID: 2061375351158853236}
+  - component: {fileID: 7280467178838080819}
+  m_Layer: 5
+  m_HasEditorInfo: 1
+  m_Name: Text (Legacy) (1)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &3648111293099433639
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 755770767857381618}
+  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: 6670566960034558026}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 0, y: -62.2}
+  m_SizeDelta: {x: 160, y: 30}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &2061375351158853236
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 755770767857381618}
+  m_CullTransparentMesh: 1
+--- !u!114 &7280467178838080819
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 755770767857381618}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: bb5b55cc5861a4951990bcc1caccc50e, type: 3}
+    m_FontSize: 24
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 2
+    m_MaxSize: 40
+    m_Alignment: 4
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: "\u9000\u51FA"
 --- !u!1 &2057452870888875413
 GameObject:
   m_ObjectHideFlags: 0
@@ -364,6 +524,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 8607046890090167354}
+  - {fileID: 8799930228682830085}
   m_Father: {fileID: 4202026612452094680}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -419,7 +580,7 @@ MonoBehaviour:
     m_SelectedTrigger: Selected
     m_DisabledTrigger: Disabled
   m_Interactable: 1
-  m_TargetGraphic: {fileID: 0}
+  m_TargetGraphic: {fileID: 3945635134592693363}
   m_OnClick:
     m_PersistentCalls:
       m_Calls: []
@@ -498,6 +659,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
+  - {fileID: 3648111293099433639}
   - {fileID: 4860858023539524685}
   m_Father: {fileID: 4202026612452094680}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

文件差异内容过多而无法显示
+ 1050 - 0
Assets/Scenes/testCombat.scene


+ 72 - 0
Assets/Scripts/Core/UI/UTool/AccumulatorUtility.cs

@@ -0,0 +1,72 @@
+using Fort23.Core;
+using UnityEngine;
+
+namespace Core.UI.UTool
+{
+    public class AccumulatorUtility
+    {
+        public class AccumulationData
+        {
+            public float currentTotal;
+            public float targetTotal;
+            public float duration;
+            public System.Action<float> onIncrement;
+            public System.Action onComplete;
+        }
+
+        /// <summary>
+        /// 开始精确累加
+        /// </summary>
+        public static async void StartAccumulation(int targetTotal, float duration, int steps,
+            System.Action<int> onStep, System.Action onComplete = null)
+        {
+            int stepValue = targetTotal / (steps);
+            float timePerStep = duration / steps;
+            int currentTotal = 0;
+
+            for (int i = 0; i < steps-1; i++)
+            {
+                await TimerComponent.Instance.WaitAsync((int)(timePerStep * 1000));
+
+
+                currentTotal += stepValue;
+                onStep?.Invoke(stepValue);
+            }
+
+            // 确保最终精度
+            // currentTotal = targetTotal;
+            onStep?.Invoke(targetTotal - currentTotal);
+            onComplete?.Invoke();
+        }
+
+        /// <summary>
+        /// 开始实时累加(基于Update)
+        /// </summary>
+        public static async void StartRealtimeAccumulation(AccumulationData data)
+        {
+            float timer = 0f;
+            data.currentTotal = 0f;
+
+            while (timer < data.duration)
+            {
+                timer += Time.deltaTime;
+                float progress = timer / data.duration;
+
+                float newTotal = progress * data.targetTotal;
+                float increment = newTotal - data.currentTotal;
+
+                if (increment > 0)
+                {
+                    data.currentTotal = newTotal;
+                    data.onIncrement?.Invoke(data.currentTotal);
+                }
+
+                // yield return null;
+            }
+
+            data.currentTotal = data.targetTotal;
+            data.onIncrement?.Invoke(data.currentTotal);
+            data.onComplete?.Invoke();
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/Core/UI/UTool/AccumulatorUtility.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 6a60933f9bd54e7ab8dfcc39a272dab3
+timeCreated: 1759998153

+ 4 - 1
Assets/Scripts/GameUI/UI/CombatPanel/ZhuanPanPanel.cs

@@ -323,7 +323,10 @@ namespace Fort23.Mono
 
         public override void AddButtonEvent()
         {
-            lanLiang_button.onClick.AddListener(() => { SkillSelectPanel.OpenSkillSelectPanel(); });
+            lanLiang_button.onClick.AddListener(() =>
+            {
+                // SkillSelectPanel.OpenSkillSelectPanel();
+            });
         }
 
         private void TaoismSkillAlter(IEventData iEventData)

+ 31 - 12
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroBreakthroughPanel.cs

@@ -99,15 +99,35 @@ namespace Fort23.Mono
                 }
 
                 //扣除道具
-                foreach (var breakthroughItemWidget in breakthroughItemWidgets)
+                // foreach (var breakthroughItemWidget in breakthroughItemWidgets)
+                // {
+                //     if (breakthroughItemWidget.itemInfo != null)
+                //     {
+                //         if (!PlayerManager.Instance.BagController.IsEnough(breakthroughItemWidget.itemInfo.itemID, 1))
+                //         {
+                //             TipMessagePanel tipMessage = await TipMessagePanel.OpenTipMessagePanel("道具不足!");
+                //             return;
+                //         }
+                //     }
+                // }
+
+                for (var i = 0; i < PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs.Length; i++)
                 {
-                    if (breakthroughItemWidget.itemInfo != null)
+                    if (!PlayerManager.Instance.BagController.IsEnough(
+                            PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs[i], 1))
                     {
-                        if (!PlayerManager.Instance.BagController.DeductItem(breakthroughItemWidget.itemInfo.itemID, 1))
-                        {
-                            TipMessagePanel tipMessage = await TipMessagePanel.OpenTipMessagePanel("道具不足!");
-                            return;
-                        }
+                        TipMessagePanel tipMessage = await TipMessagePanel.OpenTipMessagePanel("道具不足!");
+                        return;
+                    }
+                }
+
+                for (var i = 0; i < PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs.Length; i++)
+                {
+                    if (!PlayerManager.Instance.BagController.DeductItem(
+                            PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs[i], 1))
+                    {
+                        TipMessagePanel tipMessage = await TipMessagePanel.OpenTipMessagePanel("道具不足!");
+                        return;
                     }
                 }
 
@@ -122,8 +142,6 @@ namespace Fort23.Mono
                 //突破成功
                 if (ramdomValue < list[0])
                 {
-              
-
                     bool isTuPoSuccess = true;
                     if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 != nextHeroInfo.powerUpConfig.jingjie1)
                     {
@@ -133,7 +151,7 @@ namespace Fort23.Mono
                             GObjectPoolInterface.SetActive(false);
                             BackgroundPanel backgroundPanel = UIManager.Instance.GetComponent<BackgroundPanel>();
                             backgroundPanel.GObjectPoolInterface.SetActive(false);
-                          
+
                             type1 = 3;
                             ramdomValue = Random.Range(PlayerManager.Instance.myHero.powerUpConfig.LeijieDamages[0],
                                 PlayerManager.Instance.myHero.powerUpConfig.LeijieDamages[1]);
@@ -152,7 +170,7 @@ namespace Fort23.Mono
                             }
                         }
                     }
-                
+
                     if (isTuPoSuccess)
                     {
                         AudioManager.Instance.PlayAudio("ui_tupo.wav");
@@ -168,6 +186,7 @@ namespace Fort23.Mono
                         await HeroBreakthroughFailPanel.OpenPanel(2, list[1]);
                     await heroBreakthroughFailPanel.UIClosed();
                 }
+
                 heroInformationPanel.RecoverDujie();
                 UIManager.Instance.HideUIUIPanel(this);
             });
@@ -291,7 +310,7 @@ namespace Fort23.Mono
                     }
                     else
                     {
-                        Text_HeroHp.color = new Color32(249,240,204,255);
+                        Text_HeroHp.color = new Color32(249, 240, 204, 255);
                     }
                 }
                 else

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

@@ -11,6 +11,7 @@ using Fort23.UTool;
 using GameLogic.Combat.CombatTool;
 using GameLogic.Hero;
 using UnityEngine;
+using Utility.CTween;
 
 
 namespace Fort23.Mono
@@ -119,6 +120,7 @@ namespace Fort23.Mono
                         fx_ui_tupo1.gameObject.SetActive(true);
                         fx_ui_tupo1.Play();
                         await TimerComponent.Instance.WaitAsync(500);
+                        CustomInit();
                         for (var i = 0; i < JingJieIcons.Count; i++)
                         {
                             if (PlayerManager.Instance.myHero.powerUpConfig.jingjie3 - 1 == i)
@@ -136,7 +138,7 @@ namespace Fort23.Mono
                         fx_ui_tupo1.gameObject.SetActive(false);
                         MarskPanel.ClosePanel();
                         HeroBreakthroughSuccessPanel.OpenPanel(1, heroAttributData);
-                        CustomInit();
+
                         AudioManager.Instance.PlayAudio("ui_shengji.wav");
                     }
                     //大突破
@@ -405,6 +407,32 @@ namespace Fort23.Mono
             }
         }
 
+
+        /// <summary>
+        /// 吃丹药
+        /// </summary>
+        public async CTask UseExpElixir(Vector2 startPos)
+        {
+            GameObjectPool gameObjectPool = null;
+            gameObjectPool = await GObjectPool.Instance.FetchAsync<GameObjectPool>("fx_ui_danyao_tw");
+            gameObjectPool.own.transform.SetParent(this.transform);
+
+
+            Vector2 pos = transform.worldToLocalMatrix * startPos;
+            Vector2 pos1 = transform.worldToLocalMatrix *
+                           fxroot.GetComponent<RectTransform>().position;
+            gameObjectPool.own.GetComponent<RectTransform>().anchoredPosition = pos;
+            CustomTweenManager
+                .To(() => pos, x => gameObjectPool.own.transform.GetComponent<RectTransform>().anchoredPosition = x,
+                    pos1, 0.5f, gameObjectPool.own)
+                .SetEase(CustomTweenEX.CustomAnimationCurve.Line).SetLoop(false).OnCompleteAction = () =>
+            {
+                GObjectPool.Instance.Recycle(gameObjectPool);
+                fx_ui_danyao_shi.gameObject.SetActive(true);
+                fx_ui_danyao_shi.Play();
+            };
+        }
+
         public void ChangeLayerRecursively(GameObject obj, int newLayer)
         {
             if (obj == null || obj.layer == newLayer) return;

+ 20 - 10
Assets/Scripts/GameUI/UI/HeroInformationPanel/UseExpElixirPanel.cs

@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using Core.Audio;
+using Core.UI.UTool;
 using Excel2Json;
 using Fort23.Core;
 using Fort23.UTool;
@@ -68,7 +69,7 @@ namespace Fort23.Mono
 
             if (PlayerManager.Instance.BagController.DeductItem(elixirItemWidget.ItemConfig.ID, 1))
             {
-                PlayerManager.Instance.myHero.heroData.exp += elixirItemWidget.ItemConfig.associateVlaue[0];
+                // PlayerManager.Instance.myHero.heroData.exp += elixirItemWidget.ItemConfig.associateVlaue[0];
                 AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount++;
                 AccountFileInfo.Instance.SavePlayerData();
                 AudioManager.Instance.PlayAudio("ui_shiyonghuode");
@@ -83,24 +84,17 @@ namespace Fort23.Mono
             elixirItemWidget.fx_ui_danyao_qi.Play();
 
 
-            // CustomTweenManager.To()
             HeroInformationPanel heroInformationPanel = UIManager.Instance.GetComponent<HeroInformationPanel>();
-            // ImageMoveContainer imageMoveContainer = new ImageMoveContainer();
+            // heroInformationPanel.UseExpElixir()
             GameObjectPool gameObjectPool = null;
             gameObjectPool = await GObjectPool.Instance.FetchAsync<GameObjectPool>("fx_ui_danyao_tw");
             gameObjectPool.own.transform.SetParent(this.transform);
-            // gameObjectPool.own.transform.GetComponent<RectTransform>().anchoredPosition = transform.worldToLocalMatrix *
-            //     elixirItemWidget.fx_ui_danyao_qi.transform.position;
+
 
             Vector2 pos = transform.worldToLocalMatrix * elixirItemWidget.fx_ui_danyao_qi.transform.position;
             Vector2 pos1 = transform.worldToLocalMatrix *
                            heroInformationPanel.fxroot.GetComponent<RectTransform>().position;
             gameObjectPool.own.GetComponent<RectTransform>().anchoredPosition = pos;
-            // imageMoveContainer.AddACurve(pos, pos1, 0, 1.5f, gameObjectPool, (i) =>
-            // {
-            //     heroInformationPanel.fx_ui_danyao_shi.gameObject.SetActive(true);
-            //     heroInformationPanel.fx_ui_danyao_shi.Play();
-            // });
             CustomTweenManager
                 .To(() => pos, x => gameObjectPool.own.transform.GetComponent<RectTransform>().anchoredPosition = x,
                     pos1, 0.5f, gameObjectPool.own)
@@ -110,6 +104,22 @@ namespace Fort23.Mono
                 heroInformationPanel.fx_ui_danyao_shi.gameObject.SetActive(true);
                 heroInformationPanel.fx_ui_danyao_shi.Play();
             };
+
+            int exp = 0;
+
+
+            AccumulatorUtility.StartAccumulation(
+                elixirItemWidget.ItemConfig.associateVlaue[0], 0.2f, 20,
+                current =>
+                {
+                    PlayerManager.Instance.myHero.heroData.exp += current;
+                    AccountFileInfo.Instance.SavePlayerData();
+                    LogTool.Error("z" + current);
+                },
+                () => Debug.Log("累加完成!")
+            );
+
+
             Text_UseCount.text = $"今日\n{AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount}/20";
         }
 

+ 10 - 1
Assets/Scripts/GameUI/UI/Task/TaskInfoPanel.cs

@@ -62,7 +62,16 @@ namespace Fort23.Mono
             if (eventLinkData == null || eventLinkData.eventConditions == null ||
                 eventLinkData.eventConditions.Count == 0)
             {
-                Text_Condition.text = LanguageManager.Instance.Text(evenkConfig.EventConditionMessage);
+                if (evenkConfig.EventConditionMessage != 0)
+                {
+                    Text_Condition.text = LanguageManager.Instance.Text(evenkConfig.EventConditionMessage);
+                }
+                else
+                {
+                    Text_Condition.text ="";
+                }
+                
+             
             }
             else
             {

文件差异内容过多而无法显示
+ 334 - 317
UserSettings/Layouts/default-2022.dwlt


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