瀏覽代碼

小突破开发

lzx 1 天之前
父節點
當前提交
e26d793063

+ 54 - 250
Assets/Res/UI/HeroInformainPanel/HeroBreakthroughSuccessPanel.prefab

@@ -171,9 +171,10 @@ GameObject:
   - component: {fileID: 8212670971040085124}
   - component: {fileID: 4635955364539374710}
   - component: {fileID: 4794340547222225426}
+  - component: {fileID: 7717169312912944238}
   m_Layer: 5
   m_HasEditorInfo: 1
-  m_Name: Image
+  m_Name: Btn_Close
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
@@ -236,6 +237,50 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
+--- !u!114 &7717169312912944238
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6015582386914595975}
+  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: 4794340547222225426}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &7371325538380333896
 GameObject:
   m_ObjectHideFlags: 0
@@ -347,9 +392,7 @@ RectTransform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 5887916603198773163}
-  - {fileID: 6017981357554815172}
+  m_Children: []
   m_Father: {fileID: 9037135992368401232}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 1}
@@ -460,263 +503,24 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   data:
-  - key: Text_Jingjie
-    gameObject: {fileID: 0}
-    isAssetBundle: 0
-    isList: 0
-    ListCollectorDatas: []
-  - key: Text_Speed
-    gameObject: {fileID: 0}
-    isAssetBundle: 0
-    isList: 0
-    ListCollectorDatas: []
-  - key: Text_exp
-    gameObject: {fileID: 0}
-    isAssetBundle: 0
-    isList: 0
-    ListCollectorDatas: []
-  - key: Text_Level
-    gameObject: {fileID: 0}
-    isAssetBundle: 0
-    isList: 0
-    ListCollectorDatas: []
-  - key: Slider_Exp
-    gameObject: {fileID: 0}
-    isAssetBundle: 0
-    isList: 0
-    ListCollectorDatas: []
-  - key: Btn_TuPo
-    gameObject: {fileID: 0}
-    isAssetBundle: 0
-    isList: 0
-    ListCollectorDatas: []
-  - key: Btn_Dujie
-    gameObject: {fileID: 0}
-    isAssetBundle: 0
-    isList: 0
-    ListCollectorDatas: []
-  - key: Btn_DanYao
-    gameObject: {fileID: 0}
+  - key: AttributeRoot
+    gameObject: {fileID: 6341706220095682999}
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
   - key: Btn_Close
-    gameObject: {fileID: 0}
+    gameObject: {fileID: 7717169312912944238}
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
-  - key: HeroRoot
-    gameObject: {fileID: 0}
+  - key: Text_CurretnJIngjie
+    gameObject: {fileID: 499042528739118409}
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
-  - key: AttributeRoot
-    gameObject: {fileID: 6341706220095682999}
+  - key: 'Text_NextJIngjie '
+    gameObject: {fileID: 4779532759236090049}
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
   isAssetBundle: 0
---- !u!1001 &7327467424214613095
-PrefabInstance:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    serializedVersion: 3
-    m_TransformParent: {fileID: 6341706220095682999}
-    m_Modifications:
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_Pivot.x
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_Pivot.y
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMax.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMax.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMin.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMin.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_SizeDelta.x
-      value: 642.9692
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_SizeDelta.y
-      value: 31.4433
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchoredPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchoredPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5575612326490483760, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_Name
-      value: HeroAttributeWidget (1)
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-    m_RemovedGameObjects: []
-    m_AddedGameObjects: []
-    m_AddedComponents: []
-  m_SourcePrefab: {fileID: 100100000, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
---- !u!224 &6017981357554815172 stripped
-RectTransform:
-  m_CorrespondingSourceObject: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-  m_PrefabInstance: {fileID: 7327467424214613095}
-  m_PrefabAsset: {fileID: 0}
---- !u!1001 &7458622960912120584
-PrefabInstance:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    serializedVersion: 3
-    m_TransformParent: {fileID: 6341706220095682999}
-    m_Modifications:
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_Pivot.x
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_Pivot.y
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMax.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMax.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMin.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchorMin.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_SizeDelta.x
-      value: 642.9692
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_SizeDelta.y
-      value: 31.4433
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchoredPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_AnchoredPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_LocalEulerAnglesHint.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5575612326490483760, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-      propertyPath: m_Name
-      value: HeroAttributeWidget
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-    m_RemovedGameObjects: []
-    m_AddedGameObjects: []
-    m_AddedComponents: []
-  m_SourcePrefab: {fileID: 100100000, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
---- !u!224 &5887916603198773163 stripped
-RectTransform:
-  m_CorrespondingSourceObject: {fileID: 3905833519111515299, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
-  m_PrefabInstance: {fileID: 7458622960912120584}
-  m_PrefabAsset: {fileID: 0}

+ 33 - 3
Assets/Scripts/Core/Utility/Helper/TimeHelper.cs

@@ -1,11 +1,17 @@
 using System;
 using System.Linq;
 
+
 namespace Fort23.Core
 {
     public static class TimeHelper
     {
-        public static readonly long epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).Ticks;
+        public static int refreshHour = 0;
+
+        public static readonly long epoch = 0;
+        
+        private static readonly DateTime ServerStartTime = new DateTime(2025, 4, 1, 0, 0, 0, DateTimeKind.Utc); // 服务器开服时间
+
 
         public static DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
 
@@ -19,6 +25,11 @@ namespace Fort23.Core
             set => _clientFrame = value;
         }
 
+        public static long GetServerStartTime()
+        {
+            return ((ServerStartTime.Ticks - epoch) / 10000) + (8 * 60 * 60 * 1000);
+        }
+
         /// <summary>
         /// 用于唯一Id生成,不重复
         /// </summary>
@@ -44,7 +55,7 @@ namespace Fort23.Core
         /// <returns></returns>
         public static long ClientNow()
         {
-            return (DateTime.UtcNow.Ticks - epoch) / 10000;
+            return ((DateTime.UtcNow.Ticks - epoch) / 10000) + (8 * 60 * 60 * 1000);
         }
 
         /// <summary>
@@ -164,7 +175,7 @@ namespace Fort23.Core
             {
                 day = $"0{dateTime.Day}";
             }
-            
+
             if (dateTime.Hour >= 10)
             {
                 hour = dateTime.Hour.ToString();
@@ -173,6 +184,7 @@ namespace Fort23.Core
             {
                 hour = $"0{dateTime.Hour}";
             }
+
             if (dateTime.Minute >= 10)
             {
                 minute = dateTime.Minute.ToString();
@@ -181,6 +193,7 @@ namespace Fort23.Core
             {
                 minute = $"0{dateTime.Minute}";
             }
+
             if (dateTime.Second >= 10)
             {
                 second = dateTime.Second.ToString();
@@ -257,5 +270,22 @@ namespace Fort23.Core
 
             return 0;
         }
+
+        public static long GetBaseRefreshTime(long baseTime, int day = 1)
+        {
+            DateTime dateTime = DateTimeOffset.FromUnixTimeMilliseconds(baseTime).DateTime;
+            int hour = dateTime.Hour;
+            DateTime refreshDateTime = new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, refreshHour, 0, 0, DateTimeKind.Utc);
+            if (hour < refreshHour)
+            {
+                day -= 1;
+            }
+
+            refreshDateTime = refreshDateTime.AddDays(day);
+
+            long refreshTime = new DateTimeOffset(refreshDateTime).ToUnixTimeMilliseconds();
+
+            return refreshTime;
+        }
     }
 }

+ 5 - 5
Assets/Scripts/GameLogic/EventManager/EventSystemManager.cs

@@ -45,7 +45,7 @@ public class EventSystemManager : Singleton<EventSystemManager>
         if (timer > 1)
         {
             timer = 0;
-            HeroPowerUpConfig heroPowerUpConfig = ConfigComponent.Instance.Get<HeroPowerUpConfig>(1);
+            HeroPowerUpConfig heroPowerUpConfig = PlayerManager.Instance.myHero.powerUpConfig;
             if (AccountFileInfo.Instance.playerData.divineSensePoint < heroPowerUpConfig.ShenshiMax)
             {
                 AccountFileInfo.Instance.playerData.divineSensePoint += 3;
@@ -58,7 +58,7 @@ public class EventSystemManager : Singleton<EventSystemManager>
     public List<AccountFileInfo.EventList> UseDivinesense(int bigMapId)
     {
         DivineSenseConfig divineSenseConfig = ConfigComponent.Instance.Get<DivineSenseConfig>(AccountFileInfo.Instance.playerData.divineSenseLevel);
-        HeroPowerUpConfig heroPowerUpConfig = ConfigComponent.Instance.Get<HeroPowerUpConfig>(1);
+        HeroPowerUpConfig heroPowerUpConfig = PlayerManager.Instance.myHero.powerUpConfig;
         int count = AccountFileInfo.Instance.playerData.divineSensePoint / PlayerManager.Instance.gameConstantConfig.DetectEventCount;
         if (count <= 0)
         {
@@ -171,8 +171,8 @@ public class EventSystemManager : Singleton<EventSystemManager>
     {
         if (isTriggerEvent)
             return;
-        
-        if(isOpenUi)
+
+        if (isOpenUi)
             return;
         // 获取随机事件
         List<EventConfig> randomEvents = eventConfigs.Where(e => e.EventTriggerType == 2 && CanTriggerEvent(e.ID)).ToList();
@@ -303,7 +303,7 @@ public class EventSystemManager : Singleton<EventSystemManager>
     /// 完成事件
     /// </summary>
     /// <param name="eventID">事件ID</param>
-    public void CompleteEvent(AccountFileInfo.EventList eventList,bool isTriggerEvent = false)
+    public void CompleteEvent(AccountFileInfo.EventList eventList, bool isTriggerEvent = false)
     {
         this.isTriggerEvent = isTriggerEvent;
         LogTool.Log($"完成事件{eventList.eventID}");

+ 6 - 0
Assets/Scripts/GameLogic/Hero/HeroInfo.cs

@@ -39,6 +39,12 @@ namespace GameLogic.Hero
 
         public HeroInfo Upgrade()
         {
+            int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime)/1000);
+
+            int allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
+            heroData.exp += allexp;
+            heroData.exp -= powerUpConfig.levelUpExp;
+            heroData.upTime = TimeHelper.ClientNow();
             heroData.heroPowerId++;
             InitHero(heroData);
             PlayerManager.Instance.SaveHeroData(this);

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

@@ -2,6 +2,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 using Core.Utility;
+using Fort23.Core;
 using Fort23.UTool;
 using GameLogic.Bag;
 using GameLogic.Hero;
@@ -317,6 +318,7 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         playerData.heroData = heroData;
         heroData.heroModelId = 101;
         heroData.heroPowerId = 1;
+        heroData.upTime = TimeHelper.ClientNow();
 
         // BagController.Instance.AddCoin(10000);
 
@@ -339,6 +341,10 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         /// 英雄等级
         /// </summary>
         public int heroPowerId;
+
+        public int exp;
+
+        public long upTime;
     }
 
     [System.Serializable]

+ 17 - 0
Assets/Scripts/GameLogic/Player/PlayerManager.cs

@@ -52,6 +52,23 @@ public class PlayerManager : Singleton<PlayerManager>
 
 
         BagController.Init();
+        
+        StaticUpdater.Instance.RemoveRenderUpdateCallBack(Update);
+        StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
+    }
+
+    private float timer;
+    
+    private void Update()
+    {
+        timer += Time.deltaTime;
+        if (timer > 1)
+        {
+            timer = 0;
+            // PlayerManager.Instance.myHero.heroData.exp += myHero.powerUpConfig.AutoXiuwei;
+            // AccountFileInfo.Instance.SavePlayerData();
+            
+        }
     }
 
 

+ 4 - 1
Assets/Scripts/GameUI/UI/DialoguePanel/DialogueBubblePanel.cs

@@ -31,7 +31,7 @@ namespace Fort23.Mono
 
         public static async CTask OpenDialoguePanel(int id, Action<int?> finish)
         {
-            DialogueBubblePanel dialoguePanel = await UIManager.Instance.LoadAndOpenPanel<DialogueBubblePanel>(null, UILayer.Top);
+            DialogueBubblePanel dialoguePanel = await UIManager.Instance.LoadAndOpenPanel<DialogueBubblePanel>(null, UILayer.Bottom);
             dialoguePanel.ShowPanel(id, finish);
         }
 
@@ -153,6 +153,9 @@ namespace Fort23.Mono
             //
             // dotPoint.anchoredPosition = p;
 
+            if (EventSystemManager.Instance.isOpenUi)
+                return;
+
             Vector3 worldPos = CombatDrive.Instance.CombatController.CombatHeroController.playerHeroEntity.combatHeroGameObject.hpTransform.position;
             Vector3 p = UIManager.Instance.CurrCustomCameraStack.camera.WorldToScreenPoint(worldPos);
             Vector3 p2 = UIManager.Instance.UICamera.ScreenToWorldPoint(p);

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

@@ -201,6 +201,9 @@ namespace Fort23.Mono
 
         public void Update()
         {
+            if(EventSystemManager.Instance.isOpenUi)
+                return;
+            
             if (!_isUpdate) return;
 
             if (messageShowType == ShowDialogueEventData.MessageShowType.Verbatim)

+ 19 - 4
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroAttributeWidget.cs

@@ -1,5 +1,20 @@
 namespace Fort23.Mono
 {
+    public class HeroAttributeData
+    {
+        public string name;
+        public string currentValue;
+        public string nextValue;
+
+        public HeroAttributeData(string name, string currentValue, string nextValue)
+        {
+            
+            this.name = name;
+            this.currentValue = currentValue;
+            this.nextValue = nextValue;
+        }
+    }
+    
     [UIBinding(prefab = "HeroAttributeWidget")]
     public partial class HeroAttributeWidget : UIComponent
     {
@@ -19,11 +34,11 @@ namespace Fort23.Mono
         {
         }
 
-        public void CustomInit(string name,string currentValue,string nextValue)
+        public void CustomInit(HeroAttributeData data)
         {
-            Text_Name.text = name;
-            Text_Value.text = currentValue;
-            Text_NextValue.text = nextValue;
+            Text_Name.text = data.name;
+            Text_Value.text = data.currentValue;
+            Text_NextValue.text = data.nextValue;
         }
     }
 }

+ 67 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroBreakthroughSuccessPanel.cs

@@ -0,0 +1,67 @@
+using System.Collections.Generic;
+using Core.Language;
+using Fort23.Core;
+using GameLogic.Hero;
+
+namespace Fort23.Mono
+{
+    [UIBinding(prefab = "HeroBreakthroughSuccessPanel")]
+    public partial class HeroBreakthroughSuccessPanel : UIPanel
+    {
+        List<HeroAttributeWidget> heroAttributeWidgets = new List<HeroAttributeWidget>();
+
+        private void Init()
+        {
+        }
+
+        protected override void AddEvent()
+        {
+        }
+
+        protected override void DelEvent()
+        {
+        }
+
+        public override void AddButtonEvent()
+        {
+            Btn_Close.onClick.AddListener(() => { UIManager.Instance.HideUIUIPanel(this); });
+        }
+
+        public async static CTask OpenPanel(List<HeroAttributeData> heroAttributes)
+        {
+            HeroBreakthroughSuccessPanel heroBreakthroughSuccessPanel = await UIManager.Instance.LoadAndOpenPanel<HeroBreakthroughSuccessPanel>(null);
+            heroBreakthroughSuccessPanel.CustomInit(heroAttributes);
+        }
+
+        public async void CustomInit(List<HeroAttributeData> heroAttributes)
+        {
+            HeroInfo heroInfo = new HeroInfo();
+            heroInfo.InitHero(PlayerManager.Instance.myHero.heroData.heroModelId, PlayerManager.Instance.myHero.heroData.heroPowerId + 1);
+            Text_CurretnJIngjie.text = LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
+                                       LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[1]) +
+                                       LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[2]);
+
+            Text_NextJIngjie.text = LanguageManager.Instance.Text(heroInfo.powerUpConfig.jingjieLanIDs[0]) +
+                                    LanguageManager.Instance.Text(heroInfo.powerUpConfig.jingjieLanIDs[1]) +
+                                    LanguageManager.Instance.Text(heroInfo.powerUpConfig.jingjieLanIDs[2]);
+            foreach (var heroAttributeData in heroAttributes)
+            {
+                HeroAttributeWidget heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
+                heroAttributeWidget.CustomInit(heroAttributeData);
+                heroAttributeWidgets.Add(heroAttributeWidget);
+            }
+        }
+
+        public override void Close()
+        {
+            foreach (var heroAttributeWidget in heroAttributeWidgets)
+            {
+                UIManager.Instance.DormancyGComponent(heroAttributeWidget);
+            }
+
+            heroAttributeWidgets.Clear();
+
+            base.Close();
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroBreakthroughSuccessPanel.cs.meta

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

+ 62 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroBreakthroughSuccessPanelData.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 HeroBreakthroughSuccessPanel 
+	{
+	  #region 自定义数据 
+	  private RectTransform _AttributeRoot;
+	  public RectTransform AttributeRoot
+	   {
+	   get{
+	      if (_AttributeRoot == null)
+	       {
+	         _AttributeRoot  = GetUIUnit<RectTransform>("AttributeRoot"); 
+	       }
+	      return _AttributeRoot;
+	     }
+	   }
+	  private Button _Btn_Close;
+	  public Button Btn_Close
+	   {
+	   get{
+	      if (_Btn_Close == null)
+	       {
+	         _Btn_Close  = GetUIUnit<Button>("Btn_Close"); 
+	       }
+	      return _Btn_Close;
+	     }
+	   }
+	  private Text _Text_CurretnJIngjie;
+	  public Text Text_CurretnJIngjie
+	   {
+	   get{
+	      if (_Text_CurretnJIngjie == null)
+	       {
+	         _Text_CurretnJIngjie  = GetUIUnit<Text>("Text_CurretnJIngjie"); 
+	       }
+	      return _Text_CurretnJIngjie;
+	     }
+	   }
+	  private Text _Text_NextJIngjie ;
+	  public Text Text_NextJIngjie 
+	   {
+	   get{
+	      if (_Text_NextJIngjie  == null)
+	       {
+	         _Text_NextJIngjie   = GetUIUnit<Text>("Text_NextJIngjie "); 
+	       }
+	      return _Text_NextJIngjie ;
+	     }
+	   }
+	  #endregion 自定义数据结束 
+	 public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
+	{
+	 await base.SetUIGameObject(gObjectPoolInterface);
+	 Init();
+	}
+	}
+}

+ 11 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroBreakthroughSuccessPanelData.cs.meta

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

+ 57 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroHerlp.cs

@@ -0,0 +1,57 @@
+using System.Collections.Generic;
+using GameLogic.Hero;
+
+namespace Fort23.Mono
+{
+    public static class HeroHerlp
+    {
+        public static  List<HeroAttributeData> GetHeroChageHeroAttributeData(HeroInfo currentHero, HeroInfo newHero)
+        {
+            List<HeroAttributeData> heroAttributeDataList = new List<HeroAttributeData>();
+            if (currentHero.hp != newHero.hp)
+            {
+                HeroAttributeData heroAttributeData = new HeroAttributeData("生命", currentHero.hp.Value.ToString(), "+" +newHero.hp.Value.ToString());
+                heroAttributeDataList.Add(heroAttributeData);
+            }
+            
+            if (currentHero.attack != newHero.attack)
+            {
+                HeroAttributeData heroAttributeData = new HeroAttributeData("攻击", currentHero.attack.Value.ToString(), "+" +newHero.attack.Value.ToString());
+                heroAttributeDataList.Add(heroAttributeData);
+            }
+            
+            if (currentHero.defense != newHero.defense)
+            {
+                HeroAttributeData heroAttributeData = new HeroAttributeData("防御", currentHero.defense.Value.ToString(), "+" +newHero.defense.Value.ToString());
+                heroAttributeDataList.Add(heroAttributeData);
+            }
+            
+                    
+            if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
+            {
+                HeroAttributeData heroAttributeData = new HeroAttributeData("法宝倍率", currentHero.powerUpConfig.MPFactor.ToString(), "+" + currentHero.powerUpConfig.MPFactor.ToString());
+                heroAttributeDataList.Add(heroAttributeData);
+            }
+            
+            if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
+            {
+                HeroAttributeData heroAttributeData = new HeroAttributeData("护盾倍率", currentHero.powerUpConfig.HudunFactor.ToString(), "+" + currentHero.powerUpConfig.HudunFactor.ToString());
+                heroAttributeDataList.Add(heroAttributeData);
+            }
+            
+            if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
+            {
+                HeroAttributeData heroAttributeData = new HeroAttributeData("防御系数K", currentHero.powerUpConfig.defK.ToString(), "+" + currentHero.powerUpConfig.defK.ToString());
+                heroAttributeDataList.Add(heroAttributeData);
+            }
+            
+            if (currentHero.powerUpConfig.MPFactor != newHero.powerUpConfig.MPFactor)
+            {
+                HeroAttributeData heroAttributeData = new HeroAttributeData("神识上限", currentHero.powerUpConfig.ShenshiMax.ToString(), "+" + currentHero.powerUpConfig.ShenshiMax.ToString());
+                heroAttributeDataList.Add(heroAttributeData);
+            }
+
+            return heroAttributeDataList;
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroHerlp.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 823b94029bc34dd59f7ba6d07b5e322d
+timeCreated: 1745742221

+ 58 - 5
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroInformationPanel.cs

@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using Animancer;
 using Animancer.TransitionLibraries;
+using Core.Language;
 using Fort23.Core;
 using Fort23.UTool;
 using GameLogic.Hero;
@@ -33,11 +34,21 @@ namespace Fort23.Mono
         {
             Btn_TuPo.onClick.AddListener(() =>
             {
+                int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
+
+                int allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
+                if (PlayerManager.Instance.myHero.heroData.exp + allexp < PlayerManager.Instance.myHero.powerUpConfig.levelUpExp)
+                {
+                    return;
+                }
+
                 if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1)
                 {
                     //小突破
                     if (PlayerManager.Instance.myHero.powerUpConfig.jingjie2 == heroInfo.powerUpConfig.jingjie2)
                     {
+                        var heroAttributData = HeroHerlp.GetHeroChageHeroAttributeData(PlayerManager.Instance.myHero, heroInfo);
+                        HeroBreakthroughSuccessPanel.OpenPanel(heroAttributData);
                         PlayerManager.Instance.myHero.Upgrade();
                         CustomInit();
                     }
@@ -63,28 +74,69 @@ namespace Fort23.Mono
             heroInfo.InitHero(PlayerManager.Instance.myHero.heroData.heroModelId, PlayerManager.Instance.myHero.heroData.heroPowerId + 1);
 
             HeroAttributeWidget heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
-            heroAttributeWidget.CustomInit("生命", PlayerManager.Instance.myHero.hp.Value.ToString(), "+" + (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToString());
+            heroAttributeWidget.CustomInit(new HeroAttributeData("生命", PlayerManager.Instance.myHero.hp.Value.ToString(), "+" + (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToString()));
             HeroAttributeWidgets.Add(heroAttributeWidget);
 
             heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
-            heroAttributeWidget.CustomInit("攻击", PlayerManager.Instance.myHero.attack.Value.ToString(), "+" + (heroInfo.attack.Value - PlayerManager.Instance.myHero.attack.Value).ToString());
+            heroAttributeWidget.CustomInit(new HeroAttributeData("攻击", PlayerManager.Instance.myHero.attack.Value.ToString(), "+" + (heroInfo.attack.Value - PlayerManager.Instance.myHero.attack.Value).ToString()));
             HeroAttributeWidgets.Add(heroAttributeWidget);
 
             heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
-            heroAttributeWidget.CustomInit("防御", PlayerManager.Instance.myHero.defense.Value.ToString(), "+" + (heroInfo.defense.Value - PlayerManager.Instance.myHero.defense.Value).ToString());
+            heroAttributeWidget.CustomInit(new HeroAttributeData("防御", PlayerManager.Instance.myHero.defense.Value.ToString(), "+" + (heroInfo.defense.Value - PlayerManager.Instance.myHero.defense.Value).ToString()));
             HeroAttributeWidgets.Add(heroAttributeWidget);
 
             Slider_Exp.maxValue = PlayerManager.Instance.myHero.powerUpConfig.levelUpExp;
-            Slider_Exp.value = PlayerManager.Instance.myHero.exp.Value;
+            Slider_Exp.value = PlayerManager.Instance.myHero.heroData.exp;
             //
             // heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
             // heroAttributeWidget.CustomInit("生命", PlayerManager.Instance.myHero.hp.Value.ToString(), (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToString());
             // HeroAttributeWidgets.Add(heroAttributeWidget);
 
+            Text_Jingjie.text = LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
+                                LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[1]) +
+                                LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[2]);
+
             Text_Level.text = $"LV{PlayerManager.Instance.myHero.level}";
+            int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
+
+            int allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
+
+            int miao = (PlayerManager.Instance.myHero.powerUpConfig.levelUpExp - (PlayerManager.Instance.myHero.heroData.exp + allexp)) / PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
+            if (miao > 0)
+            {
+                Text_Speed.text = $"修炼速度:{PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei}/秒 | 下次突破时间{miao}秒";
+            }
+            else
+            {
+                Text_Speed.text = $"修炼速度:{PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei}/秒 | 可以突破";
+            }
+
+
             Text_exp.text = $"{PlayerManager.Instance.myHero.exp}/{PlayerManager.Instance.myHero.powerUpConfig.levelUpExp}";
         }
 
+        [CustomMethod(CustomMethodType.Update)]
+        public void Update()
+        {
+            int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
+
+            int allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
+
+            Slider_Exp.value = PlayerManager.Instance.myHero.heroData.exp + allexp;
+
+            Text_exp.text = $"{PlayerManager.Instance.myHero.heroData.exp + allexp}/{PlayerManager.Instance.myHero.powerUpConfig.levelUpExp}";
+
+            int miao = (PlayerManager.Instance.myHero.powerUpConfig.levelUpExp - (PlayerManager.Instance.myHero.heroData.exp + allexp)) / PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
+            if (miao > 0)
+            {
+                Text_Speed.text = $"修炼速度:{PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei}/秒 | 下次突破时间{miao}秒";
+            }
+            else
+            {
+                Text_Speed.text = $"修炼速度:{PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei}/秒 | 可以突破";
+            }
+        }
+
 
         private async CTask CreatHero()
         {
@@ -127,10 +179,11 @@ namespace Fort23.Mono
             }
         }
 
-        public async static void OpenPanel()
+        public async static CTask<HeroInformationPanel> OpenPanel()
         {
             HeroInformationPanel heroInformationPanel = await UIManager.Instance.LoadAndOpenPanel<HeroInformationPanel>(null);
             heroInformationPanel.CustomInit();
+            return heroInformationPanel;
         }
 
         public override void Close()

+ 5 - 2
Assets/Scripts/GameUI/UI/MainPanel/MainPanel.cs

@@ -69,9 +69,12 @@ namespace Fort23.Mono
             });
             
             
-            Btn_HeroInfomation.onClick.AddListener(() =>
+            Btn_HeroInfomation.onClick.AddListener(async () =>
             {
-                HeroInformationPanel.OpenPanel();
+                EventSystemManager.Instance.isOpenUi = true;
+                HeroInformationPanel  heroInformationPanel = await HeroInformationPanel.OpenPanel();
+                await heroInformationPanel.UIClosed();
+                EventSystemManager.Instance.isOpenUi = false;
             });
         }
 

文件差異過大導致無法顯示
+ 0 - 0
Assets/StreamingAssets/assetConfig.txt


部分文件因文件數量過多而無法顯示