Forráskód Böngészése

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

zg 3 napja
szülő
commit
a1ffbf2931

+ 18 - 18
Assets/Res/Config/BuffConfig.json

@@ -12,7 +12,7 @@
       "effectValue": [
         1.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -32,7 +32,7 @@
       "effectValue": [
         0.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -53,7 +53,7 @@
         2.0,
         10.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -73,7 +73,7 @@
       "effectValue": [
         1.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -93,7 +93,7 @@
       "effectValue": [
         1.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -113,7 +113,7 @@
       "effectValue": [
         0.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -133,7 +133,7 @@
       "effectValue": [
         0.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": -1.0,
       "buffType": 2,
       "dispelType": 1,
@@ -153,7 +153,7 @@
       "effectValue": [
         0.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -173,7 +173,7 @@
       "effectValue": [
         0.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -193,7 +193,7 @@
       "effectValue": [
         5.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -213,7 +213,7 @@
       "effectValue": [
         2.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -234,7 +234,7 @@
         100.0,
         10.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -254,7 +254,7 @@
       "effectValue": [
         20.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -274,7 +274,7 @@
       "effectValue": [
         10.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -294,7 +294,7 @@
       "effectValue": [
         10.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -315,7 +315,7 @@
         10.0,
         2.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -336,7 +336,7 @@
         10.0,
         1.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,
@@ -356,7 +356,7 @@
       "effectValue": [
         3.0
       ],
-      "timeType": 1,
+      "timeType": 2,
       "buffTime": 9.0,
       "buffType": 2,
       "dispelType": 1,

+ 4 - 4
Assets/Res/UI/SentimentPanel/SentimentInfoPanel.prefab

@@ -890,10 +890,10 @@ RectTransform:
   m_Children: []
   m_Father: {fileID: 9037135992368401232}
   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_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 750, y: 1624}
+  m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3982180203602062132
 CanvasRenderer:
@@ -916,7 +916,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 0, g: 0, b: 0, a: 0.003921569}
+  m_Color: {r: 0, g: 0, b: 0, a: 0.6901961}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1

+ 1 - 1
Assets/Scenes/testCombat.scene

@@ -2317,7 +2317,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 9214784224709271120, guid: 1076536f8fdf47942aa287592c6a8b19, type: 3}
       propertyPath: m_IsActive
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     m_RemovedComponents: []
     m_RemovedGameObjects: []

+ 113 - 24
Assets/Scripts/GameLogic/Combat/Buff/BuffBasic.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
 using Fort23.Core;
 using Fort23.UTool;
@@ -18,6 +19,8 @@ namespace GameLogic.Combat.Buff
         protected float _jianGe;
         public System.Action buffFinish;
 
+        private List<BuffStackInfo> _buffStackInfos = new List<BuffStackInfo>();
+
         public int buffCount
         {
             get { return _count; }
@@ -25,6 +28,7 @@ namespace GameLogic.Combat.Buff
 
         protected int _count;
         private float _time;
+
         public void Init(CombatHeroEntity combatHeroEntity, CombatHeroEntity source, BuffInfo buffInfo)
         {
             _triggerData.Source = this;
@@ -37,23 +41,53 @@ namespace GameLogic.Combat.Buff
 
         public void AddBuffCount(CombatHeroEntity source, BuffInfo buffInfo)
         {
-            _currTime = 0;
-            int c = buffCount + buffInfo.count;
-            if (c > buffInfo.BuffConfig.overlayCount)
+            if (buffInfo.BuffConfig.timeType == 1)
             {
-                c = buffInfo.BuffConfig.overlayCount - buffCount;
+                _currTime = 0;
+                int c = buffCount + buffInfo.count;
+                if (c > buffInfo.BuffConfig.overlayCount)
+                {
+                    c = buffInfo.BuffConfig.overlayCount - buffCount;
+                }
+                else
+                {
+                    c = buffInfo.count;
+                }
+
+                if (c <= 0)
+                {
+                    return;
+                }
+
+                _count += c;
             }
             else
             {
-                c = buffInfo.count;
-            }
+                int c = buffCount + buffInfo.count;
+                if (c > buffInfo.BuffConfig.overlayCount)
+                {
+                    c = buffInfo.BuffConfig.overlayCount - buffCount;
+                }
+                else
+                {
+                    c = buffInfo.count;
+                }
 
-            if (c <= 0)
-            {
-                return;
+                if (c <= 0)
+                {
+                    return;
+                }
+
+                buffInfo.count = c;
+                _count += c;
+                BuffStackInfo buffStackInfo = CObjectPool.Instance.Fetch<BuffStackInfo>();
+                buffStackInfo.BuffBasic = this;
+                buffStackInfo.BuffInfo = buffInfo;
+                buffStackInfo.count = c;
+                _buffStackInfos.Add(buffStackInfo);
             }
 
-            _count += c;
+
             UpdateEffect();
         }
 
@@ -67,7 +101,6 @@ namespace GameLogic.Combat.Buff
 
         public void UpdateEffect()
         {
-            
             ProUpdateEffect();
         }
 
@@ -78,11 +111,45 @@ namespace GameLogic.Combat.Buff
 
         public void ReduceCount(int count)
         {
-            _count -= count;
-            if (_count <= 0)
+            if (buffInf.BuffConfig.timeType == 1)
             {
-                combatHeroEntity.BuffControl.RemoveBuff(this);
-                return;
+                _count -= count;
+                if (_count <= 0)
+                {
+                    combatHeroEntity.BuffControl.RemoveBuff(this);
+                    return;
+                }
+            }
+            else
+            {
+                while (count > 0)
+                {
+                    if (_buffStackInfos.Count <= 0)
+                    {
+                        combatHeroEntity.BuffControl.RemoveBuff(this);
+                        return;
+                    }
+
+                    BuffStackInfo buffStackInfo = _buffStackInfos[0];
+                    if (buffStackInfo.count >= count)
+                    {
+                        buffStackInfo.count -= count;
+                        _count -= count;
+                        count = 0;
+                        if (buffStackInfo.count == 0)
+                        {
+                            RemoveBuffStackInfo(buffStackInfo);
+                        }
+                    }
+                    else
+                    {
+                        int c = buffStackInfo.count;
+                        count -= c;
+                        _count -= c;
+                        buffStackInfo.count = 0;
+                        RemoveBuffStackInfo(buffStackInfo);
+                    }
+                }
             }
 
             UpdateEffect();
@@ -126,7 +193,6 @@ namespace GameLogic.Combat.Buff
             CObjectPool.Instance.Recycle(buffInf);
             buffInf = null;
             combatHeroEntity = null;
-           
         }
 
         protected virtual void ProDormancyObj()
@@ -135,15 +201,24 @@ namespace GameLogic.Combat.Buff
 
         public void Update(float t)
         {
-        
-
-           
-            _currTime += t;
-            if (buffInf.buffTime > 0 && _currTime > buffInf.buffTime)
+            if (buffInf.BuffConfig.timeType == 1)
             {
-                combatHeroEntity.BuffControl.RemoveBuff(this);
-                return;
+                _currTime += t;
+                if (buffInf.buffTime > 0 && _currTime > buffInf.buffTime)
+                {
+                    combatHeroEntity.BuffControl.RemoveBuff(this);
+                    return;
+                }
+            }
+            else
+            {
+                for (int i = 0; i < _buffStackInfos.Count; i++)
+                {
+                    BuffStackInfo buffStackInfo = _buffStackInfos[i];
+                    buffStackInfo.Update(t);
+                }
             }
+
             if (_jianGe > 0)
             {
                 _time += t;
@@ -153,12 +228,26 @@ namespace GameLogic.Combat.Buff
                     UpdateJumping();
                 }
             }
+
             ProUpdate(t);
         }
 
+        public void RemoveBuffStackInfo(BuffStackInfo buffStackInfo)
+        {
+            _buffStackInfos.Remove(buffStackInfo);
+            _count -= buffStackInfo.count;
+            CObjectPool.Instance.Recycle(buffStackInfo);
+            if (_buffStackInfos.Count <= 0)
+            {
+                combatHeroEntity.BuffControl.RemoveBuff(this);
+                return;
+            }
+
+            UpdateEffect();
+        }
+
         protected virtual void UpdateJumping()
         {
-            
         }
 
         protected virtual void ProUpdate(float t)

+ 34 - 0
Assets/Scripts/GameLogic/Combat/Buff/BuffStackInfo.cs

@@ -0,0 +1,34 @@
+using Fort23.Core;
+
+namespace GameLogic.Combat.Buff
+{
+    public class BuffStackInfo : CObject
+    {
+        public BuffInfo BuffInfo;
+        public int count;
+        public float _currTime;
+        public BuffBasic BuffBasic;
+
+        public override void ActiveObj()
+        {
+        }
+
+        public override void DormancyObj()
+        {
+            BuffInfo = null;
+            count = 0;
+            _currTime = 0;
+            BuffBasic = null;
+        }
+
+        public void Update(float time)
+        {
+            _currTime += time;
+            if (BuffInfo.buffTime > 0 && _currTime > BuffInfo.buffTime)
+            {
+                BuffBasic.RemoveBuffStackInfo(this);
+                return;
+            }
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/GameLogic/Combat/Buff/BuffStackInfo.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: f3fffdb5885847de8ed8b6e96e0dd653
+timeCreated: 1750669422

+ 12 - 12
Assets/Scripts/GameLogic/Combat/CombatTool/CombatCameraControllder.cs

@@ -53,18 +53,18 @@ namespace GameLogic.Combat.CombatTool
 
         private void SencenBesselPathAlter(IEventData eventData)
         {
-            isUpdateCameraToPath = true;
-            currValue = _cameraSelectValue;
-            if (CombatController.currActiveCombat.CombatSenceController.currBesselPath.isCentre)
-            {
-                targetValue = 0.5f;
-            }
-            else
-            {
-                targetValue = 0.7f;
-            }
-
-            _currTime = 0;
+            // isUpdateCameraToPath = true;
+            // currValue = _cameraSelectValue;
+            // if (CombatController.currActiveCombat.CombatSenceController.currBesselPath.isCentre)
+            // {
+            //     targetValue = 0.5f;
+            // }
+            // else
+            // {
+            //     targetValue = 0.7f;
+            // }
+            //
+            // _currTime = 0;
         }
 
         protected void HeroClick(IEventData eventData)

+ 1 - 0
Assets/Scripts/GameLogic/Player/AccountFileInfo.cs

@@ -133,6 +133,7 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
     /// <summary>
     /// 心境属性
     /// </summary>
+    [System.Serializable]
     public class SentimentProperty
     {
         // 属性类别

+ 1 - 1
Assets/Scripts/GameUI/EventManager/EventSystemManager.cs

@@ -327,7 +327,7 @@ public class EventSystemManager : Singleton<EventSystemManager>
                         }
 
                         int randomValue4 = Random.Range(0, 101);
-                        if (randomValue4 >= eventConfig1.RefreshProbability)
+                        if (randomValue4 <= eventConfig1.RefreshProbability)
                         {
                             eventLists.Add(AddEvent(eventConfig1.ID));
                             isRefence = true;

+ 7 - 0
Assets/Scripts/GameUI/UI/DivineSence/ShengShiConditionWidget.cs

@@ -30,6 +30,13 @@ namespace Fort23.Mono
 			Text_Name.text = EventHelper.GetTaskMessage(eventConditionData) ;
 			
 		}
+		
+		public void CustomInit(string tips)
+		{
+			
+			Text_Name.text = tips ;
+			
+		}
 
 	}
 }

+ 9 - 1
Assets/Scripts/GameUI/UI/MainPanel/MainPanel.cs

@@ -216,7 +216,9 @@ namespace Fort23.Mono
 
                 AccountFileInfo.EventLinkData eventLinkData = eventList.eventLinks.FirstOrDefault(el => el.eventLinkId == eventList.curStep);
 
-                if (eventLinkData != null && eventLinkData.eventConditions != null && eventLinkData.eventConditions.Count >= 0)
+                EventLinkConfig evenkConfig = ConfigComponent.Instance.Get<EventLinkConfig>(eventLinkData.eventLinkId);
+
+                if (eventLinkData != null && eventLinkData.eventConditions != null && eventLinkData.eventConditions.Count > 0)
                 {
                     foreach (var eventConditionData in eventLinkData.eventConditions)
                     {
@@ -225,6 +227,12 @@ namespace Fort23.Mono
                         _shengShiConditionWidgets.Add(shengShiConditionWidget);
                     }
                 }
+                else if (evenkConfig.EventConditionMessage != 0)
+                {
+                    ShengShiConditionWidget shengShiConditionWidget = await UIManager.Instance.CreateGComponent<ShengShiConditionWidget>(null, EventConditionRoot);
+                    shengShiConditionWidget.CustomInit(LanguageManager.Instance.Text(evenkConfig.EventConditionMessage));
+                    _shengShiConditionWidgets.Add(shengShiConditionWidget);
+                }
             }
             else
             {

+ 25 - 8
Assets/Scripts/GameUI/UI/SentimentPanel/SentimentInfoPanel.cs

@@ -10,12 +10,15 @@ namespace Fort23.Mono
     [UIBinding(prefab = "SentimentInfoPanel")]
     public partial class SentimentInfoPanel : UIPanel
     {
+        AccountFileInfo.SentimentProperty curretnSentimentProperty;
         private AccountFileInfo.SentimentData sentimentData;
 
         List<SentimentEffectWidget> sentimentEffectWidgets = new List<SentimentEffectWidget>();
 
         private void Init()
         {
+            isAddStack = false;
+            isPopUi = true;
         }
 
         protected override void AddEvent()
@@ -36,6 +39,7 @@ namespace Fort23.Mono
             sentimentData = uiData[0] as AccountFileInfo.SentimentData;
             SentimentEffectWidget sentimentEffectWidget = await UIManager.Instance.CreateGComponentForObject<SentimentEffectWidget>(MainSentimentEffectWidget, null);
             sentimentEffectWidget.CustomInit(sentimentData.mainSentiment);
+            sentimentEffectWidget.OnClick = OnClick;
             foreach (var sentimentDataSentimentProperty in sentimentData.sentimentProperties)
             {
                 SentimentEffectWidget sentimentEffectWidget1 = await UIManager.Instance.CreateGComponent<SentimentEffectWidget>(null, Content);
@@ -47,24 +51,37 @@ namespace Fort23.Mono
             return await base.AsyncInit(uiData);
         }
 
-        private void UpdateUi(SentimentEffectConfig sentimentEffectConfig)
-        {
-            Text_Name.text = LanguageManager.Instance.Text(sentimentEffectConfig.name);
-            // Text_Desc.text = UtilTools.GetString(sentimentEffectConfig.)
-        }
+        // private void UpdateUi(SentimentEffectConfig sentimentEffectConfig)
+        // {
+        //
+        // }
 
         private void OnClick(ItemWidgetBasic obj)
         {
             SentimentEffectWidget sentimentEffectWidget = obj as SentimentEffectWidget;
-
+            curretnSentimentProperty = sentimentEffectWidget.sentimentProperty;
             int conFigId = sentimentEffectWidget.sentimentProperty.groupId * 100 + sentimentEffectWidget.sentimentProperty.level;
             SentimentEffectConfig sentimentEffectConfig = ConfigComponent.Instance.Get<SentimentEffectConfig>(conFigId);
-            UpdateUi(sentimentEffectConfig);
+            Text_Name.text = LanguageManager.Instance.Text(sentimentEffectConfig.name);
+            Text_Desc.text = UtilTools.GetString(LanguageManager.Instance.Text(sentimentEffectConfig.massge), sentimentEffectConfig.effectVale);
+            Text_Level.text = $"当前层 ;{curretnSentimentProperty.level}/{5}";
+            // UpdateUi(sentimentEffectConfig);
         }
 
-        public async CTask OpenPanel(AccountFileInfo.SentimentData sentimentData)
+        public static async CTask OpenPanel(AccountFileInfo.SentimentData sentimentData)
         {
             await UIManager.Instance.LoadAndOpenPanel<SentimentInfoPanel>(null, uiData: new object[] { sentimentData });
         }
+
+        public override void Close()
+        {
+            foreach (var sentimentEffectWidget in sentimentEffectWidgets)
+            {
+                UIManager.Instance.DormancyGComponent(sentimentEffectWidget);
+            }
+            sentimentEffectWidgets.Clear();
+
+            base.Close();
+        }
     }
 }

+ 1 - 0
Assets/Scripts/GameUI/UI/SentimentPanel/SentimentPanel.cs

@@ -37,6 +37,7 @@ namespace Fort23.Mono
 		private void OnClick(ItemWidgetBasic obj)
 		{
 			SentimentWidget sentimentWidget = obj as SentimentWidget;
+			SentimentInfoPanel.OpenPanel(sentimentWidget.sentimentData);
 		}
 
 		public async static CTask OpenPanel()

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
Assets/StreamingAssets/assetConfig.txt


BIN
Excel2Json/Excel/Buff.xlsx


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott