Kaynağa Gözat

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

李桃 2 hafta önce
ebeveyn
işleme
717b31a113
27 değiştirilmiş dosya ile 437 ekleme ve 174 silme
  1. 30 4
      Assets/Res/Config/DivineSenseConfig.json
  2. 0 30
      Assets/Res/Config/DivineSenseIntervalConfig.json
  3. 0 7
      Assets/Res/Config/DivineSenseIntervalConfig.json.meta
  4. 16 0
      Assets/Res/Config/EventConditionConfig.json
  5. 4 16
      Assets/Res/Config/EventConfig.json
  6. 2 1
      Assets/Res/Config/GameConstantConfig.json
  7. 1 1
      Assets/Res/UI/CombatPanel.prefab
  8. 50 0
      Assets/Scripts/Core/UI/UTool/UtilTools.cs
  9. 4 16
      Assets/Scripts/GameData/ExcelConfig/DivineSenseConfig.cs
  10. 0 44
      Assets/Scripts/GameData/ExcelConfig/DivineSenseIntervalConfig.cs
  11. 6 18
      Assets/Scripts/GameData/ExcelConfig/EventConfig.cs
  12. 6 0
      Assets/Scripts/GameData/ExcelConfig/GameConstantConfig.cs
  13. 1 1
      Assets/Scripts/GameLogic/Combat/CombatTool/RandomEventController.cs
  14. 47 30
      Assets/Scripts/GameLogic/EventManager/EventManager.cs
  15. 11 0
      Assets/Scripts/GameLogic/Player/AccountFileInfo.cs
  16. 3 0
      Assets/Scripts/GameUI/DialogueManager.meta
  17. 6 0
      Assets/Scripts/GameUI/DialogueManager/DialogueManager.cs
  18. 0 0
      Assets/Scripts/GameUI/DialogueManager/DialogueManager.cs.meta
  19. 19 2
      Assets/Scripts/GameUI/UI/CombatPanel/CombatPanel.cs
  20. 3 3
      Assets/Scripts/GameUI/UI/CombatPanel/ShengShiEventWidget.cs
  21. 8 0
      Assets/Scripts/GameUI/UI/DialoguePanel.meta
  22. 146 0
      Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanel.cs
  23. 1 1
      Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanel.cs.meta
  24. 62 0
      Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanelData.cs
  25. 11 0
      Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanelData.cs.meta
  26. BIN
      Excel2Json/Excel/DivineSenseConfig.xlsx
  27. BIN
      Excel2Json/Excel/EventConfig.xlsx

+ 30 - 4
Assets/Res/Config/DivineSenseConfig.json

@@ -3,10 +3,36 @@
     {
       "ID": 1,
       "DetectEventCount": 3,
-      "QualityBonusChance": 10,
-      "DivineSenseCount": 100,
-      "DivineSenseCost": -1,
-      "MinDivineSenseValue": 100
+      "QualityBonusChance": [
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0
+      ],
+      "exp": null
+    },
+    {
+      "ID": 2,
+      "DetectEventCount": 3,
+      "QualityBonusChance": [
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0,
+        10.0
+      ],
+      "exp": null
     }
   ]
 }

+ 0 - 30
Assets/Res/Config/DivineSenseIntervalConfig.json

@@ -1,30 +0,0 @@
-{
-  "configList": [
-    {
-      "ID": 1,
-      "MinValue": 100,
-      "MaxValue": 300,
-      "EventQualities": [
-        1
-      ]
-    },
-    {
-      "ID": 2,
-      "MinValue": 300,
-      "MaxValue": 700,
-      "EventQualities": [
-        1,
-        2
-      ]
-    },
-    {
-      "ID": 3,
-      "MinValue": 700,
-      "MaxValue": 1000,
-      "EventQualities": [
-        2,
-        3
-      ]
-    }
-  ]
-}

+ 0 - 7
Assets/Res/Config/DivineSenseIntervalConfig.json.meta

@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: CH4Xt3utBnIKTnaQH1TVlShlVW72gEy0MgAkQSS9kA80aEC9PXdlgQL2ra9e
-TextScriptImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 16 - 0
Assets/Res/Config/EventConditionConfig.json

@@ -7,6 +7,22 @@
     {
       "ID": 2,
       "operation": 1
+    },
+    {
+      "ID": 11,
+      "operation": null
+    },
+    {
+      "ID": 12,
+      "operation": null
+    },
+    {
+      "ID": 101,
+      "operation": null
+    },
+    {
+      "ID": 102,
+      "operation": null
     }
   ]
 }

+ 4 - 16
Assets/Res/Config/EventConfig.json

@@ -5,6 +5,7 @@
       "EventType": 1,
       "EventTriggerType": 1,
       "EventQuality": 1,
+      "EventCompleteCount": null,
       "EventConditionId": [
         2
       ],
@@ -12,20 +13,14 @@
         2
       ],
       "Description": null,
-      "DialogueID": null,
-      "RewardID": [
-        1001
-      ],
-      "RewardCount": [
-        10
-      ],
-      "TriggerEventNextId": -1
+      "DialogueID": null
     },
     {
       "ID": 2,
       "EventType": 2,
       "EventTriggerType": 1,
       "EventQuality": 1,
+      "EventCompleteCount": null,
       "EventConditionId": [
         1
       ],
@@ -36,14 +31,7 @@
       "DialogueID": 1,
       "associateVlaue": [
         1
-      ],
-      "RewardID": [
-        1001
-      ],
-      "RewardCount": [
-        10
-      ],
-      "TriggerEventNextId": -1
+      ]
     }
   ]
 }

+ 2 - 1
Assets/Res/Config/GameConstantConfig.json

@@ -27,7 +27,8 @@
         140,
         150,
         160
-      ]
+      ],
+      "DetectEventCount": 100
     }
   ]
 }

+ 1 - 1
Assets/Res/UI/CombatPanel.prefab

@@ -2397,7 +2397,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &5559010447687375213
 RectTransform:
   m_ObjectHideFlags: 0

+ 50 - 0
Assets/Scripts/Core/UI/UTool/UtilTools.cs

@@ -8,12 +8,14 @@ using System.Text.RegularExpressions;
 using UnityEngine;
 #endif
 using System.IO;
+using System.Linq;
 using System.Runtime.Serialization.Formatters.Binary;
 #if !COMBAT_SERVER
 using UnityEngine.Profiling;
 #endif
 using System.Security.Cryptography;
 using Fort23.UTool;
+using Random = System.Random;
 
 namespace Utility
 {
@@ -853,6 +855,54 @@ namespace Utility
                 return (T)formatter.Deserialize(memoryStream);
             }
         }
+        
+        public static T GetRandomByWeight<T>(List<T> items, int[] weights)
+        {
+            if (items.Count != weights.Length)
+            {
+                LogTool.Error("权重和数组长度不一致");
+            }
+
+
+            int totalWeight = weights.Sum();
+            Random random = new Random();
+            int randomValue = random.Next(0, totalWeight);
+
+            int currentWeight = 0;
+            for (int i = 0; i < items.Count; i++)
+            {
+                currentWeight += weights[i];
+                if (randomValue < currentWeight)
+                    return items[i];
+            }
+
+            // 理论上不会到达这里,但为了安全返回最后一个元素
+            return items[items.Count - 1];
+        }
+        
+        public static T GetRandomByWeight<T>(List<T> items, float[] weights)
+        {
+            
+            if (items.Count != weights.Length)
+            {
+                LogTool.Error("权重和数组长度不一致");
+            }
+
+            float totalWeight = weights.Sum();
+            Random random = new Random();
+            float randomValue = (float)(random.NextDouble() * totalWeight);
+
+            float currentWeight = 0;
+            for (int i = 0; i < items.Count; i++)
+            {
+                currentWeight += weights[i];
+                if (randomValue < currentWeight)
+                    return items[i];
+            }
+
+            // 理论上不会到达这里,但为了安全返回最后一个元素
+            return items[items.Count - 1];
+        }
     }
 
 

+ 4 - 16
Assets/Scripts/GameData/ExcelConfig/DivineSenseConfig.cs

@@ -27,27 +27,15 @@ public int DetectEventCount;
 
 
 		/// <summary>
-		///品质加成概率(目前是线性增长)
+		///品质概率
 		/// </summary>
-public int QualityBonusChance;
+public float[] QualityBonusChance;
 
 
 		/// <summary>
-		///触发额外权重乘数的步长(例如每100神识值)
+		///经验
 		/// </summary>
-public int DivineSenseCount;
-
-
-		/// <summary>
-		///神识消耗值 -1完全消耗
-		/// </summary>
-public int DivineSenseCost;
-
-
-		/// <summary>
-		///探索所需最低神识值
-		/// </summary>
-public int MinDivineSenseValue;
+public int exp;
 
 
 	}

+ 0 - 44
Assets/Scripts/GameData/ExcelConfig/DivineSenseIntervalConfig.cs

@@ -1,44 +0,0 @@
-// Auto Generated Code By excel2json
-// Generate From Excel\DivineSenseConfig.xlsx. SheetName: DivineSenseIntervalConfig
-
-using System;
-using Fort23.GameData;
-
-namespace Excel2Json
-{
-	[Config(prefab = "DivineSenseIntervalConfig.json")]
-	public partial class DivineSenseIntervalConfigHolder : ConfigHolder<DivineSenseIntervalConfig>
	{
-	}
-
-
-	[Serializable]
-	public struct DivineSenseIntervalConfig : IConfig
	{
-		public int GetID() {return ID;} 
-		/// <summary>
-		///ID
-		/// </summary>
-public int ID;
-
-
-		/// <summary>
-		///神识值区间下界(包含
-		/// </summary>
-public int MinValue;
-
-
-		/// <summary>
-		///神识值区间上界(不包含)
-		/// </summary>
-public int MaxValue;
-
-
-		/// <summary>
-		///允许的通用事件品质
-		/// </summary>
-public int[] EventQualities;
-
-
-	}
-
-}
-// End of Auto Generated Code

+ 6 - 18
Assets/Scripts/GameData/ExcelConfig/EventConfig.cs

@@ -38,6 +38,12 @@ public int EventTriggerType;
 public int EventQuality;
 
 
+		/// <summary>
+		///事件次数 -1无限
+		/// </summary>
+public int EventCompleteCount;
+
+
 		/// <summary>
 		///触发条件类型
 		/// </summary>
@@ -68,24 +74,6 @@ public int DialogueID;
 public int[] associateVlaue;
 
 
-		/// <summary>
-		///奖励ID
-		/// </summary>
-public int[] RewardID;
-
-
-		/// <summary>
-		///奖励数量
-		/// </summary>
-public int[] RewardCount;
-
-
-		/// <summary>
-		///触发下一个事件id
-		/// </summary>
-public int TriggerEventNextId;
-
-
 	}
 
 }

+ 6 - 0
Assets/Scripts/GameData/ExcelConfig/GameConstantConfig.cs

@@ -68,6 +68,12 @@ public int maxLv;
 public int[] equipmentRarityAttributeFactor;
 
 
+		/// <summary>
+		///每多少神识探测事件数量
+		/// </summary>
+public int DetectEventCount;
+
+
 	}
 
 }

+ 1 - 1
Assets/Scripts/GameLogic/Combat/CombatTool/RandomEventController.cs

@@ -11,7 +11,7 @@ namespace GameLogic.Combat.CombatTool
         public void StartRandomEvent(Transform root)
         {
             
-            CombatController.currActiveCombat.CombatSenceController.StartPayShengShi(root);
+            
             Debug.Log("模拟测试事件");
             int eventCount = Random.Range(3, 5);
             for (int i = 0; i < eventCount; i++)

+ 47 - 30
Assets/Scripts/GameLogic/EventManager/EventManager.cs

@@ -13,35 +13,35 @@ using Random = UnityEngine.Random;
 public class EventSystemManager : Singleton<EventSystemManager>
 {
     List<EventConfig> eventConfigs = new List<EventConfig>();
-    private List<DivineSenseIntervalConfig> divineSenseIntervalConfigs = new List<DivineSenseIntervalConfig>();
 
     public void CustomInit()
     {
         eventConfigs = ConfigComponent.Instance.GetAll<EventConfig>().ToList();
-        divineSenseIntervalConfigs = ConfigComponent.Instance.GetAll<DivineSenseIntervalConfig>().ToList();
     }
 
 
-    public void DetectEvents(int bigMapId)
+    public List<EventConfig> DetectEvents(int bigMapId)
     {
         BigMap bigMap = ConfigComponent.Instance.Get<BigMap>(bigMapId);
-        DivineSenseConfig divineSenseConfig = ConfigComponent.Instance.Get<DivineSenseConfig>(1);
+        DivineSenseConfig divineSenseConfig = ConfigComponent.Instance.Get<DivineSenseConfig>(AccountFileInfo.Instance.playerData.divineSenseLevel);
 
+        List<int> qualitys = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
 
         //先掉落出品质
-        List<ItemInfo> itemInfos = DropManager.Instance.DropItem(1);
+        int quality = UtilTools.GetRandomByWeight(qualitys, divineSenseConfig.QualityBonusChance);
+
 
         // 获取通用事件
-        List<EventConfig> globalEvents = eventConfigs.Where(e => e.EventTriggerType == 3 && CanTriggerEvent(e.ID) && e.EventQuality == itemInfos[0].dropItemConfig.itemID[0]).ToList();
+        List<EventConfig> globalEvents = eventConfigs.Where(e => e.EventTriggerType == 3 && CanTriggerEvent(e.ID) && e.EventQuality == quality).ToList();
 
 
         //神识场景事件
-        List<EventConfig> candidateEvents = eventConfigs.Where(e => bigMap.DivineSenseGeneralEvent.Contains(e.ID) && CanTriggerEvent(e.ID) && e.EventQuality == itemInfos[0].dropItemConfig.itemID[0]).ToList();
+        List<EventConfig> candidateEvents = eventConfigs.Where(e => bigMap.DivineSenseGeneralEvent.Contains(e.ID) && CanTriggerEvent(e.ID) && e.EventQuality == quality).ToList();
 
         if (candidateEvents.Count == 0 && globalEvents.Count == 0)
         {
-            LogTool.Warning("没有可以刷新的任务");
-            return;
+            LogTool.Error("没有可以刷新的事件");
+            return default;
         }
 
 
@@ -66,30 +66,41 @@ public class EventSystemManager : Singleton<EventSystemManager>
             }
         }
 
-
-        // 触发事件
-        foreach (var evt in triggeredEvents)
-        {
-            TriggerEvent(evt);
-        }
-
         if (triggeredEvents.Count == 0)
         {
             Debug.Log("没有可以触发的事件");
+            return default;
         }
+
+        return triggeredEvents;
+        // // 触发事件
+        // foreach (var evt in triggeredEvents)
+        // {
+        //     TriggerEvent(evt);
+        // }
     }
 
-    /// <summary>
-    /// 根据神识值选择通用神识区间
-    /// </summary>
-    private DivineSenseIntervalConfig SelectInterval(float divineSenseValue)
+    public void DetectRandomEvents()
     {
-        var intervals = divineSenseIntervalConfigs
-            .Where(i => divineSenseValue >= i.MinValue && divineSenseValue < i.MaxValue)
-            .ToList();
-        return intervals.FirstOrDefault();
+        // 获取通用事件
+        List<EventConfig> randomEvents = eventConfigs.Where(e => e.EventTriggerType == 2 && CanTriggerEvent(e.ID)).ToList();
+
+
+        //神识场景事件
+
+
+        if (randomEvents.Count == 0)
+        {
+            LogTool.Warning("没有可以刷新的事件");
+            return;
+        }
+
+
+        int idex = Random.Range(1, randomEvents.Count);
+        TriggerEvent(randomEvents[idex]);
     }
 
+
     /// <summary>
     /// 触发单个事件,处理对话、奖励和完成逻辑。
     /// </summary>
@@ -98,12 +109,7 @@ public class EventSystemManager : Singleton<EventSystemManager>
         Debug.Log($"触发事件: {evt.Description} (ID: {evt.ID}, 品质: {evt.EventQuality})");
         if (evt.DialogueID > 0)
         {
-            DialogueManager.Instance.StartDialogue(evt.DialogueID, evt.ID);
-        }
-
-        if (evt.RewardID.Length > 0)
-        {
-            // TODO: 实现奖励逻辑
+            // DialogueManager.Instance.StartDialogue(evt.DialogueID, evt.ID);
         }
 
         CompleteEvent(evt.ID);
@@ -157,5 +163,16 @@ public class EventSystemManager : Singleton<EventSystemManager>
     public void CompleteEvent(int eventID)
     {
         LogTool.Log($"完成任务{eventID}");
+        AccountFileInfo.EventData eventData =  AccountFileInfo.Instance.playerData.events.FirstOrDefault((e) => e.eventID == eventID);
+        if (eventData == null)
+        {
+            eventData = new AccountFileInfo.EventData();
+            eventData.eventID = eventID;
+        }
+
+        eventData.completeCount++;
+        AccountFileInfo.Instance.playerData.events.Add(eventData);
+        AccountFileInfo.Instance.SavePlayerData();
+        
     }
 }

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

@@ -27,6 +27,10 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
     [System.Serializable]
     public class PlayerData
     {
+        public int divineSenseLevel = 1;
+        
+        public List<EventData> events = new List<EventData>();
+        
         public List<ItemData> ItemListData = new List<ItemData>();
 
       
@@ -54,6 +58,13 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         // /// </summary>
         // public List<HeroData> HeroListInBackDatas = new List<HeroData>();
     }
+    
+    public class EventData
+    {
+        public int eventID ;
+        //完成cishu
+        public int completeCount = 0;
+    }
 
 
     /// <summary>

+ 3 - 0
Assets/Scripts/GameUI/DialogueManager.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: c0b51378f2614ea18c9558f232462776
+timeCreated: 1745307432

+ 6 - 0
Assets/Scripts/GameLogic/EventManager/DialogueManager.cs → Assets/Scripts/GameUI/DialogueManager/DialogueManager.cs

@@ -1,7 +1,9 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
+using Common.Utility.CombatEvent;
 using Excel2Json;
+using Fort23.Mono;
 using Fort23.UTool;
 using UnityEngine;
 using Utility;
@@ -52,6 +54,10 @@ public class DialogueManager : Singleton<DialogueManager>
 
 
         //todo 加载对话ui
+        DialoguePanel.OpenDialoguePanel(dialogueConfig.Content, null, ShowDialogueEventData.MessageShowType.Default, () =>
+        {
+
+        });
         currentNodeID++;
     }
 

+ 0 - 0
Assets/Scripts/GameLogic/EventManager/DialogueManager.cs.meta → Assets/Scripts/GameUI/DialogueManager/DialogueManager.cs.meta


+ 19 - 2
Assets/Scripts/GameUI/UI/CombatPanel/CombatPanel.cs

@@ -1,4 +1,6 @@
+using System.Collections.Generic;
 using Common.Utility.CombatEvent;
+using Excel2Json;
 using Fort23.Core;
 using GameLogic.Combat.CombatTool;
 using UnityEngine;
@@ -81,17 +83,32 @@ namespace Fort23.Mono
             CameraSelect.onValueChanged.AddListener(CameraSelect_onValueChanged);
             AutoUse.onValueChanged.AddListener((x) =>
             {
+              
                 CombatController.currActiveCombat.CombatHeroController.playerHeroEntity.MagicWeaponControl.isAutoUse =
                     x;
             });
         }
 
 
-        private void Bnt_shengShi_onClick()
+        private async void Bnt_shengShi_onClick()
         {
             UIManager.Instance.DormancyAllGComponent<ShengShiEventWidget>();
-            CombatController.currActiveCombat.RandomEventController.StartRandomEvent(CombatController.currActiveCombat
+            CombatController.currActiveCombat.CombatSenceController.StartPayShengShi(CombatController.currActiveCombat
                 .CombatHeroController.playerHeroEntity.GameObject.transform);
+            List<EventConfig> eventConfigs =  EventSystemManager.Instance.DetectEvents(1);
+            if(eventConfigs == null || eventConfigs.Count == 0)
+                return;
+            for (var i = 0; i < eventConfigs.Count; i++)
+            {
+                ShengShiEventWidget shengShiEventWidget =
+                    await UIManager.Instance.CreateGComponentForObject<ShengShiEventWidget>(ShengShiEventWidget, null,
+                        DynamicEvent,
+                        isInstance: true);
+                shengShiEventWidget.InitShengShiEventWidget(eventConfigs[i].ID);
+            }
+            //
+            // CombatController.currActiveCombat.RandomEventController.StartRandomEvent(CombatController.currActiveCombat
+            //     .CombatHeroController.playerHeroEntity.GameObject.transform);
         }
 
         private void CameraSelect_onValueChanged(float value)

+ 3 - 3
Assets/Scripts/GameUI/UI/CombatPanel/ShengShiEventWidget.cs

@@ -1,3 +1,4 @@
+using Core.Language;
 using Excel2Json;
 using Fort23.UTool;
 
@@ -25,13 +26,12 @@ namespace Fort23.Mono
 
         private void Button_onClick()
         {
-            
         }
 
         public void InitShengShiEventWidget(int id)
         {
-            RandomEventConfig randomEventConfig = ConfigComponent.Instance.Get<RandomEventConfig>(id);
-            Massge.text = randomEventConfig.eventMassge;
+            EventConfig randomEventConfig = ConfigComponent.Instance.Get<EventConfig>(id);
+            Massge.text = LanguageManager.Instance.Text(randomEventConfig.Description);
         }
     }
 }

+ 8 - 0
Assets/Scripts/GameUI/UI/DialoguePanel.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: WikbvHz+AXgHp+Osu7blkenJ3QNuwBPl7GO+zVvkEx5KykJ8zz0EBxEqANfc
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 146 - 0
Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanel.cs

@@ -0,0 +1,146 @@
+using System.Text;
+using Common.Utility.CombatEvent;
+using Core.Language;
+using UnityEngine;
+
+namespace Fort23.Mono
+{
+    [UIBinding(prefab = "DialoguePanel")]
+    public partial class DialoguePanel : UIPanel
+    {
+        private int[] dialogueMessaga;
+        private ShowDialogueEventData.MessageShowType messageShowType;
+        private System.Action finish;
+        private int index;
+
+        private char[] _currShowMessage;
+
+        private float _showTime = 0.05f;
+        private float _currShowTime = 0;
+        protected StringBuilder _sb = new StringBuilder();
+        private int _currShowIndex;
+
+        private bool _isUpdate;
+        private bool _isShowNextButton;
+        private string[] showIconName;
+
+        public static async void OpenDialoguePanel(int[] dialogueMessaga, string[] icon,
+            ShowDialogueEventData.MessageShowType messageShowType,
+            System.Action finish)
+        {
+            DialoguePanel dialoguePanel = await UIManager.Instance.LoadAndOpenPanel<DialoguePanel>(null, UILayer.Top);
+            // dialoguePanel.GObjectPoolInterface.SetActive(false);
+            dialoguePanel.ShowPanel(dialogueMessaga, icon, messageShowType, finish);
+        }
+
+        private void Init()
+        {
+        }
+
+        protected override void AddEvent()
+        {
+        }
+
+        protected override void DelEvent()
+        {
+        }
+
+        public override void AddButtonEvent()
+        {
+            nextButton.onClick.AddListener(NextShow);
+        }
+
+        private void NextShow()
+        {
+            StartShowMassge();
+        }
+
+        public void ShowPanel(int[] dialogueMessaga, string[] icon,
+            ShowDialogueEventData.MessageShowType messageShowType,
+            System.Action finish)
+        {
+            showIconName = icon;
+            this.dialogueMessaga = dialogueMessaga;
+            this.messageShowType = messageShowType;
+            this.finish = finish;
+            index = 0;
+            StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
+            StartShowMassge();
+        }
+
+        private void StartShowMassge()
+        {
+            if (index >= dialogueMessaga.Length)
+            {
+                UIManager.Instance.HideUIUIPanel(this);
+                finish?.Invoke();
+                return;
+            }
+
+            _isShowNextButton = false;
+            nextIcon.SetActive(false);
+            string m = LanguageManager.Instance.Text(dialogueMessaga[index]);
+
+            if (showIconName != null && index < showIconName.Length)
+            {
+                icon.icon_name = showIconName[index];
+            }
+
+            index++;
+            switch (messageShowType)
+            {
+                case ShowDialogueEventData.MessageShowType.Default:
+                    message.text = m;
+                    ShowNextIcon();
+                    break;
+                case ShowDialogueEventData.MessageShowType.Verbatim:
+                    _sb.Clear();
+                    _currShowMessage = m.ToCharArray();
+                    _sb.Append(_currShowMessage[0]);
+                    message.text = _sb.ToString();
+                    _isUpdate = true;
+                    _currShowIndex = 1;
+                    break;
+            }
+        }
+
+        private void ShowNextIcon()
+        {
+            nextIcon.SetActive(true);
+            _isShowNextButton = true;
+        }
+
+        public override void Hide()
+        {
+            base.Hide();
+            StaticUpdater.Instance.RemoveRenderUpdateCallBack(Update);
+        }
+
+        public void Update()
+        {
+            if (!_isUpdate)
+            {
+                return;
+            }
+
+            if (messageShowType == ShowDialogueEventData.MessageShowType.Verbatim)
+            {
+                if (_currShowIndex >= _currShowMessage.Length)
+                {
+                    _isUpdate = false;
+                    ShowNextIcon();
+                    return;
+                }
+
+                _currShowTime += Time.deltaTime;
+                if (_currShowTime > _showTime)
+                {
+                    _currShowTime -= _showTime;
+                    _sb.Append(_currShowMessage[_currShowIndex]);
+                    _currShowIndex++;
+                    message.text = _sb.ToString();
+                }
+            }
+        }
+    }
+}

+ 1 - 1
Assets/Scripts/GameData/ExcelConfig/DivineSenseIntervalConfig.cs.meta → Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanel.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: B3hL5n6vBnOYmVXzDk1CqwQR+iPVg+YYCwmwrSxvEN6LfAAyIYqDhsU5FRNl
+guid: D39Nsy2pWn65ShEG8IKBu7Jg1maKHY8SKTcLKktroqDzEohYPMa/+dlNTkV+
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 62 - 0
Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanelData.cs

@@ -0,0 +1,62 @@
+using Fort23.Core;
+using Fort23.UTool;
+using UnityEngine.UI;
+using UnityEngine;
+using System.Collections.Generic;
+namespace Fort23.Mono
+{
+	public partial class DialoguePanel 
+	{
+	  #region 自定义数据 
+	  private GameObject _nextIcon;
+	  public GameObject nextIcon
+	   {
+	   get{
+	      if (_nextIcon == null)
+	       {
+	         _nextIcon  = GetUIUnit<GameObject>("nextIcon"); 
+	       }
+	      return _nextIcon;
+	     }
+	   }
+	  private Text _message;
+	  public Text message
+	   {
+	   get{
+	      if (_message == null)
+	       {
+	         _message  = GetUIUnit<Text>("message"); 
+	       }
+	      return _message;
+	     }
+	   }
+	  private Button _nextButton;
+	  public Button nextButton
+	   {
+	   get{
+	      if (_nextButton == null)
+	       {
+	         _nextButton  = GetUIUnit<Button>("nextButton"); 
+	       }
+	      return _nextButton;
+	     }
+	   }
+	  private MyImage _icon;
+	  public MyImage icon
+	   {
+	   get{
+	      if (_icon == null)
+	       {
+	         _icon  = GetUIUnit<MyImage>("icon"); 
+	       }
+	      return _icon;
+	     }
+	   }
+	  #endregion 自定义数据结束 
+	 public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
+	{
+	 await base.SetUIGameObject(gObjectPoolInterface);
+	 Init();
+	}
+	}
+}

+ 11 - 0
Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanelData.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: DnwesSKuVHMQMYaAypQmXbdQhOcAfCxAAxE+BRhyqhhCYY+p99TrzTX9djQ1
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Excel2Json/Excel/DivineSenseConfig.xlsx


BIN
Excel2Json/Excel/EventConfig.xlsx