ソースを参照

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

zg 1 週間 前
コミット
c4107cb265

+ 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.0073602796
+    - _Alpha: 0
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0

+ 2 - 2
Assets/Art/VFX/Materials/UIMat/ui_renwu_lg.mat

@@ -57,13 +57,13 @@ Material:
         m_Offset: {x: 0, y: 0}
     m_Ints: []
     m_Floats:
-    - _Alpha: 0.14950955
+    - _Alpha: 0.27183676
     - _AlphaCutoff: 0.5
     - _ColorMask: 15
     - _EnableExternalAlpha: 0
     - _MainSpeedU: 0.5
     - _MainSpeedV: 0.5
-    - _MainTexOffsetU: 0.27650046
+    - _MainTexOffsetU: 0.12937427
     - _MainTexOffsetV: 0
     - _MainTilingU: 0.8
     - _MainTilingV: 1

+ 8 - 149
Assets/Res/UI/DialoguePanel/DialoguePanel.prefab

@@ -495,16 +495,13 @@ RectTransform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 2563421227056249499}
-  - {fileID: 5595262446980668160}
-  - {fileID: 589604893561469813}
+  m_Children: []
   m_Father: {fileID: 8657432734085162108}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0}
   m_AnchorMax: {x: 0.5, y: 0}
-  m_AnchoredPosition: {x: 0, y: 436.3}
-  m_SizeDelta: {x: 131, y: 312.24}
+  m_AnchoredPosition: {x: 752, y: 436.3}
+  m_SizeDelta: {x: 131, y: 14}
   m_Pivot: {x: 0.5, y: 0}
 --- !u!222 &3941290691031440729
 CanvasRenderer:
@@ -521,7 +518,7 @@ MonoBehaviour:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1631362662767161543}
-  m_Enabled: 0
+  m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
   m_Name: 
@@ -535,7 +532,7 @@ MonoBehaviour:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1631362662767161543}
-  m_Enabled: 0
+  m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
   m_Name: 
@@ -1128,51 +1125,6 @@ MonoBehaviour:
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}
   direction: 0
---- !u!1 &2917372404834608202
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 5595262446980668160}
-  - component: {fileID: 1884391634831059489}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: pos2
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &5595262446980668160
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 2917372404834608202}
-  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: 1
-  m_Children: []
-  m_Father: {fileID: 608461590454648113}
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 1}
-  m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 65.5, y: -163.12}
-  m_SizeDelta: {x: 640.5879, y: 40}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &1884391634831059489
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 2917372404834608202}
-  m_CullTransparentMesh: 1
 --- !u!1 &2996157684196886011
 GameObject:
   m_ObjectHideFlags: 0
@@ -1983,51 +1935,6 @@ MonoBehaviour:
   m_OnClick:
     m_PersistentCalls:
       m_Calls: []
---- !u!1 &5064809279279465937
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 2563421227056249499}
-  - component: {fileID: 8364296936952236986}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: pos1
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &2563421227056249499
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5064809279279465937}
-  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: 1
-  m_Children: []
-  m_Father: {fileID: 608461590454648113}
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 1}
-  m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 65.5, y: -52}
-  m_SizeDelta: {x: 640.5879, y: 40}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &8364296936952236986
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5064809279279465937}
-  m_CullTransparentMesh: 1
 --- !u!1 &5411678273692701274
 GameObject:
   m_ObjectHideFlags: 0
@@ -2290,11 +2197,8 @@ MonoBehaviour:
   - key: OptionPos
     gameObject: {fileID: 608461590454648113}
     isAssetBundle: 0
-    isList: 1
-    ListCollectorDatas:
-    - gameObject: {fileID: 589604893561469813}
-    - gameObject: {fileID: 5595262446980668160}
-    - gameObject: {fileID: 2563421227056249499}
+    isList: 0
+    ListCollectorDatas: []
   isAssetBundle: 1
 --- !u!1 &5501269362975452296
 GameObject:
@@ -3419,51 +3323,6 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1.73
   m_Text: "\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60\u4F60"
---- !u!1 &7923091462285952063
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 589604893561469813}
-  - component: {fileID: 6894548406029453908}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: pos3
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &589604893561469813
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7923091462285952063}
-  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: 1
-  m_Children: []
-  m_Father: {fileID: 608461590454648113}
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 1}
-  m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 65.5, y: -274.24}
-  m_SizeDelta: {x: 640.5879, y: 40}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &6894548406029453908
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7923091462285952063}
-  m_CullTransparentMesh: 1
 --- !u!1 &8459987454782038077
 GameObject:
   m_ObjectHideFlags: 0
@@ -3521,7 +3380,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &3275273584098972649
 RectTransform:
   m_ObjectHideFlags: 0

+ 4 - 0
Assets/Res/UI/MainHeroPanel/MainHeroPanel.prefab

@@ -2305,6 +2305,10 @@ PrefabInstance:
       propertyPath: m_LocalEulerAnglesHint.z
       value: 0
       objectReference: {fileID: 0}
+    - target: {fileID: 4733503334704012583, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
+      propertyPath: m_IsActive
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 5575612326490483760, guid: 7b3817d41d862244c92d181cc8325cd1, type: 3}
       propertyPath: m_Name
       value: HeroAttributeWidgetGam

+ 3 - 2
Assets/Scripts/GameLogic/Bag/BagController.cs

@@ -385,9 +385,10 @@ namespace GameLogic.Bag
             //这里要设成0是因为,随机掉落的东西,第一次进背包时,先把数量去掉(否则会掉会多加1个)
             //该方法结束后,有统一加数量的代码,看后续代码。
             // itemInfo.count.Value = 0l;
-            m_allBagDic.Add(itemInfo.guid, new ItemInfo(itemInfo.itemID,0));
+            ItemInfo newIteminfo = new ItemInfo(itemInfo.itemID, 0);
+            m_allBagDic.Add(itemInfo.guid, newIteminfo);
 
-            return itemInfo;
+            return newIteminfo;
         }
 
         public long GetItemCount(int itemId)

+ 100 - 72
Assets/Scripts/GameLogic/Hero/HeroInfo.cs

@@ -30,6 +30,7 @@ namespace GameLogic.Hero
 
         // public List<int> ImmortalBond = new List<int>();
 
+        private Map<HeroAttributeType, float> attributeValue = new Map<HeroAttributeType, float>();
 
         public HeroInfo()
         {
@@ -150,6 +151,7 @@ namespace GameLogic.Hero
 
         public void ComputeHeroInfo()
         {
+            attributeValue.Clear();
             attributeBlValue.Clear();
             Metal = 100;
             Wood = 100;
@@ -205,43 +207,48 @@ namespace GameLogic.Hero
                 daolvSkill daolvSkill = ConfigComponent.Instance.Get<daolvSkill>(keyValuePair.Key);
                 ComputeHeroAttributeType(daolvSkill.AttrID, keyValuePair.Value);
             }
+
             //心境带来的加成
             AddSentimentData();
-           
+
             if (CombatController.currActiveCombat != null && CombatController.currActiveCombat.playerHeroEntity != null)
             {
                 CombatController.currActiveCombat.playerHeroEntity.CurrCombatHeroInfo = this.Copy();
                 CombatController.currActiveCombat.playerHeroEntity.MaxCombatHeroInfo = this.Copy();
             }
+
+            AddAttributeValue();
         }
 
         private void AddSentimentData()
         {
-            SentimentEffectConfig[] allSentimentEffectConfigs =   ConfigComponent.Instance.GetAll<SentimentEffectConfig>();
-            List<AccountFileInfo.SentimentData> SentimentDatas =  AccountFileInfo.Instance.playerData.SentimentDatas;
+            SentimentEffectConfig[] allSentimentEffectConfigs =
+                ConfigComponent.Instance.GetAll<SentimentEffectConfig>();
+            List<AccountFileInfo.SentimentData> SentimentDatas = AccountFileInfo.Instance.playerData.SentimentDatas;
             for (int i = 0; i < SentimentDatas.Count; i++)
             {
-                AccountFileInfo.SentimentData sentimentData=   SentimentDatas[i];
+                AccountFileInfo.SentimentData sentimentData = SentimentDatas[i];
                 for (int j = 0; j < sentimentData.sentimentProperties.Count; j++)
                 {
-                    AddSentimentProperty( sentimentData.sentimentProperties[i],allSentimentEffectConfigs);
+                    AddSentimentProperty(sentimentData.sentimentProperties[i], allSentimentEffectConfigs);
                 }
-              
             }
         }
 
-        private void AddSentimentProperty(AccountFileInfo.SentimentProperty sentimentProperty,SentimentEffectConfig[] allSentimentEffectConfigs)
+        private void AddSentimentProperty(AccountFileInfo.SentimentProperty sentimentProperty,
+            SentimentEffectConfig[] allSentimentEffectConfigs)
         {
             SentimentEffectConfig currSentimentEffectConfig = default;
             for (int i = 0; i < allSentimentEffectConfigs.Length; i++)
             {
-                SentimentEffectConfig sentimentEffectConfig=   allSentimentEffectConfigs[i];
-                if(sentimentEffectConfig.groupId==sentimentProperty.groupId&& sentimentEffectConfig.level==sentimentProperty.level)
+                SentimentEffectConfig sentimentEffectConfig = allSentimentEffectConfigs[i];
+                if (sentimentEffectConfig.groupId == sentimentProperty.groupId &&
+                    sentimentEffectConfig.level == sentimentProperty.level)
                 {
-                    currSentimentEffectConfig= sentimentEffectConfig;
+                    currSentimentEffectConfig = sentimentEffectConfig;
                 }
             }
-           
+
             switch (currSentimentEffectConfig.effectType)
             {
                 case 1:
@@ -276,92 +283,113 @@ namespace GameLogic.Hero
                             Earth += currSentimentEffectConfig.effectVale[1];
                             break;
                     }
+
                     break;
-                case 6: 
-                    finallyHarmReduce= currSentimentEffectConfig.effectVale[0];
+                case 6:
+                    finallyHarmReduce = currSentimentEffectConfig.effectVale[0];
                     break;
                 case 7:
-                    abnormalHarmAdd= currSentimentEffectConfig.effectVale[0];
+                    abnormalHarmAdd = currSentimentEffectConfig.effectVale[0];
                     break;
                 case 8:
-                    Fire_Proficient= currSentimentEffectConfig.effectVale[0];
+                    Fire_Proficient = currSentimentEffectConfig.effectVale[0];
                     break;
                 case 9:
-                    Wood_Proficient= currSentimentEffectConfig.effectVale[0];
+                    Wood_Proficient = currSentimentEffectConfig.effectVale[0];
                     break;
                 case 10:
-                    Metal_Proficient= currSentimentEffectConfig.effectVale[0];
+                    Metal_Proficient = currSentimentEffectConfig.effectVale[0];
                     break;
                 case 11:
-                    Water_Proficient= currSentimentEffectConfig.effectVale[0];
+                    Water_Proficient = currSentimentEffectConfig.effectVale[0];
                     break;
                 case 12:
-                    Earth_Proficient= currSentimentEffectConfig.effectVale[0];
+                    Earth_Proficient = currSentimentEffectConfig.effectVale[0];
                     break;
                 case 99:
                     // Fire_HarmAdd= currSentimentEffectConfig.effectVale[0];
                     break;
-                
             }
         }
 
-        private void ComputeHeroAttributeType(int shuxingID, float value)
+        private void AddAttributeValue()
         {
-            switch ((HeroAttributeType)shuxingID)
+            for (attributeValue.Begin(); attributeValue.Next();)
             {
-                case HeroAttributeType.HP:
-                    hp.Value += (int)value;
-                    break;
-                case HeroAttributeType.ATT:
-                    attack.Value += (int)value;
-                    break;
-                case HeroAttributeType.DEF:
-                    defense.Value += (int)value;
-                    break;
-                case HeroAttributeType.HP_BL:
-                    hp.Value += (long)(hp.Value * (value / 100f));
-                    break;
-                case HeroAttributeType.ATT_BL:
-                    attack.Value += (long)(attack.Value * (value / 100f));
-                    break;
-                case HeroAttributeType.DEF_BL:
-                    defense.Value += (long)(defense.Value * (value / 100f));
-                    break;
-                case HeroAttributeType.ShengShi_BL:
-                    shenshi.Value += (long)(shenshi.Value * (value / 100f));
-                    break;
-                case HeroAttributeType.Gold:
-                    Metal += value;
-                    break;
-                case HeroAttributeType.Wood:
-                    Wood += value;
-                    break;
-                case HeroAttributeType.Fire:
-                    Fire += value;
-                    break;
-                case HeroAttributeType.Water:
-                    Water += value;
-                    break;
-                case HeroAttributeType.Earth:
-                    Earth += value;
-                    break;
-                case HeroAttributeType.Shields:
-                    Shield.Value += (int)value;
-                    break;
-                default:
-                    if (attributeBlValue.TryGetValue((HeroAttributeType)shuxingID, out var value1)
-                       )
-                    {
-                        attributeBlValue[(HeroAttributeType)shuxingID] = value1 + value;
-                    }
-                    else
-                    {
-                        attributeBlValue.Add((HeroAttributeType)shuxingID, value);
-                    }
+                HeroAttributeType heroAttributeType = attributeValue.Key;
+                float value = attributeValue.Value;
+                switch (heroAttributeType)
+                {
+                    case HeroAttributeType.HP:
+                        hp.Value += (int)value;
+                        break;
+                    case HeroAttributeType.ATT:
+                        attack.Value += (int)value;
+                        break;
+                    case HeroAttributeType.DEF:
+                        defense.Value += (int)value;
+                        break;
+                    case HeroAttributeType.HP_BL:
+                        hp.Value += (long)(hp.Value * (value / 100f));
+                        break;
+                    case HeroAttributeType.ATT_BL:
+                        attack.Value += (long)(attack.Value * (value / 100f));
+                        break;
+                    case HeroAttributeType.DEF_BL:
+                        defense.Value += (long)(defense.Value * (value / 100f));
+                        break;
+                    case HeroAttributeType.ShengShi_BL:
+                        shenshi.Value += (long)(shenshi.Value * (value / 100f));
+                        break;
+                    case HeroAttributeType.Gold:
+                        Metal += value;
+                        break;
+                    case HeroAttributeType.Wood:
+                        Wood += value;
+                        break;
+                    case HeroAttributeType.Fire:
+                        Fire += value;
+                        break;
+                    case HeroAttributeType.Water:
+                        Water += value;
+                        break;
+                    case HeroAttributeType.Earth:
+                        Earth += value;
+                        break;
+                    case HeroAttributeType.Shields:
+                        Shield.Value += (int)value;
+                        break;
+                    // default:
+                    //     if (attributeBlValue.TryGetValue((HeroAttributeType)shuxingID, out var value1)
+                    //        )
+                    //     {
+                    //         attributeBlValue[(HeroAttributeType)shuxingID] = value1 + value;
+                    //     }
+                    //     else
+                    //     {
+                    //         attributeBlValue.Add((HeroAttributeType)shuxingID, value);
+                    //     }
+                    //
 
+                    // break;
+                }
+            }
+            attributeValue.Clear();
+        }
 
-                    break;
+        private void ComputeHeroAttributeType(int shuxingID, float value)
+        {
+            HeroAttributeType heroAttributeType = (HeroAttributeType)shuxingID;
+            if (attributeValue.TryGetValue(heroAttributeType, out float oldValue))
+            {
+                attributeValue[heroAttributeType] = oldValue + value;
             }
+            else
+            {
+                attributeValue.Add(heroAttributeType, value);
+            }
+
+            // attributeValue.Add((HeroAttributeType)shuxingID,);
         }
     }
 }

+ 47 - 13
Assets/Scripts/GameUI/UI/DialoguePanel/DialoguePanel.cs

@@ -400,10 +400,12 @@ namespace Fort23.Mono
                 case ShowDialogueEventData.MessageShowType.Verbatim:
                     _sb.Clear();
                     _currShowMessage = m.ToCharArray();
-                    if (eventConditionConfig.DialogueType == 2 && eventConditionConfig.NPCID == 100 && PlayerManager.Instance.PlayerName != String.Empty)
+                    if (eventConditionConfig.DialogueType == 2 && eventConditionConfig.NPCID == 100 &&
+                        PlayerManager.Instance.PlayerName != String.Empty)
                     {
                         _sb.Append(PlayerManager.Instance.PlayerName + ":");
                     }
+
                     _sb.Append(_currShowMessage[0]);
                     showText.text = _sb.ToString();
                     _isUpdate = true;
@@ -415,28 +417,59 @@ namespace Fort23.Mono
             LayoutRebuilder.ForceRebuildLayoutImmediate(Dialgue);
         }
 
+        List<DialogueOptionWidget> dialogueOptionWidgets = new List<DialogueOptionWidget>();
+
         private async void ShowOptions()
         {
             await MarskPanel.OpenPanel();
             UIManager.Instance.DormancyAllGComponent<DialogueOptionWidget>();
+            dialogueOptionWidgets.Clear();
             _isShowingOptions = true;
 
             if (eventConditionConfig.optionType == 1 && eventConditionConfig.optionPara1 != null)
             {
                 OptionMarsk.SetActive(true);
+                using (CTaskAwaitBuffer<DialogueOptionWidget> cts = new CTaskAwaitBuffer<DialogueOptionWidget>())
+                {
+                    for (var i = 0; i < eventConditionConfig.optionPara1.Length; i++)
+                    {
+                        cts.AddTask(UIManager.Instance.CreateGComponent<DialogueOptionWidget>(null, OptionPos));
+                    }
+
+                    dialogueOptionWidgets = await cts.WaitAll();
+                }
+
                 for (var i = 0; i < eventConditionConfig.optionPara1.Length; i++)
                 {
-                    int index = eventConditionConfig.optionPara1.Length - 1 - i;
-                    DialogueOptionWidget dialogueOptionWidget =
-                        await UIManager.Instance.CreateGComponent<DialogueOptionWidget>(null, OptionRoot);
-                    dialogueOptionWidget.CustomInit(i, CurrentEventList, eventConditionConfig.optionPara1[i],
+                    dialogueOptionWidgets[i].CustomInit(i, CurrentEventList, eventConditionConfig.optionPara1[i],
                         eventConditionConfig.ID, SelectOption);
-                    dialogueOptionWidget.transform.position = OptionPos[index].position;
-                    await TimerComponent.Instance.WaitAsync(200);
                 }
 
 
-                LayoutRebuilder.ForceRebuildLayoutImmediate(Dialgue);
+                LayoutRebuilder.ForceRebuildLayoutImmediate(OptionPos);
+                OptionRoot.sizeDelta = OptionPos.sizeDelta;
+                List<Vector2> pos = new List<Vector2>();
+                for (var i = 0; i < dialogueOptionWidgets.Count; i++)
+                {
+                    pos.Add(dialogueOptionWidgets[i].transform.anchoredPosition);
+                }
+
+                for (var i = 0; i < dialogueOptionWidgets.Count; i++)
+                {
+                    dialogueOptionWidgets[i].transform.parent = OptionRoot;
+                    dialogueOptionWidgets[i].transform.anchoredPosition = pos[i];
+                    dialogueOptionWidgets[i].Animator.Play("DialogueOptionWidgetopen");
+                    await TimerComponent.Instance.WaitAsync(200);
+                }
+
+                // for (var i = dialogueOptionWidgets.Count - 1; i >= 0; i--)
+                // {
+                //     Vector2 p = dialogueOptionWidgets[i].transform.anchoredPosition;
+                //     dialogueOptionWidgets[i].transform.SetParent(OptionRoot);
+                //     dialogueOptionWidgets[i].transform.anchoredPosition = p;
+                //     dialogueOptionWidgets[i].Animator.Play("DialogueOptionWidgetopen");
+                //     await TimerComponent.Instance.WaitAsync(200);
+                // }
             }
 
             await MarskPanel.ClosePanel();
@@ -507,7 +540,7 @@ namespace Fort23.Mono
                 if (_currShowTime > _showTime)
                 {
                     _currShowTime -= _showTime;
-                    
+
                     string v = _currShowMessage[_currShowIndex].ToString();
                     if (v == "<")
                     {
@@ -520,7 +553,7 @@ namespace Fort23.Mono
                             _sb.Append(ve);
                             if (ve == ">")
                             {
-                                string ve1 =  _currShowMessage[i - 1].ToString();
+                                string ve1 = _currShowMessage[i - 1].ToString();
                                 if (ve1 == "r")
                                 {
                                     endIndex = i;
@@ -528,6 +561,7 @@ namespace Fort23.Mono
                                 }
                             }
                         }
+
                         _currShowIndex += count;
                     }
                     else
@@ -535,9 +569,8 @@ namespace Fort23.Mono
                         _sb.Append(_currShowMessage[_currShowIndex]);
                         _currShowIndex++;
                     }
-                    
-                    
-                  
+
+
                     showText.text = _sb.ToString();
                 }
             }
@@ -546,6 +579,7 @@ namespace Fort23.Mono
         public async override CTask Close()
         {
             UIManager.Instance.DormancyAllGComponent<DialogueOptionWidget>();
+            dialogueOptionWidgets.Clear();
             _isShowingOptions = false;
             _skipTyping = false;
             index = 0;

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

@@ -239,13 +239,13 @@ namespace Fort23.Mono
 	      return _DialgueType1Anim;
 	     }
 	   }
-	  private List<RectTransform> _OptionPos;
-	  public List<RectTransform> OptionPos
+	  private RectTransform _OptionPos;
+	  public RectTransform OptionPos
 	   {
 	   get{
 	      if (_OptionPos == null)
 	       {
-	         _OptionPos  = GetUIUnit<List<RectTransform>>("OptionPos"); 
+	         _OptionPos  = GetUIUnit<RectTransform>("OptionPos"); 
 	       }
 	      return _OptionPos;
 	     }

+ 4 - 4
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceInfoPanel.cs

@@ -150,25 +150,25 @@ namespace Fort23.Mono
             count = count + EventSystemManager.Instance.GetShenShiCount() > maxCount
                 ? maxCount - EventSystemManager.Instance.GetShenShiCount()
                 : count;
-            count = count > 2 ? 2 : count;
+            int mincount = count > 2 ? 2 : count;
 
 
             if (count == 1 || count == 0)
             {
                 Slider_Count.minValue = 0;
                 Slider_Count.maxValue = count;
-                Slider_Count.value = count;
+                Slider_Count.value = mincount;
                 Slider_Count.interactable = false;
             }
             else
             {
                 Slider_Count.minValue = 1;
                 Slider_Count.maxValue = count;
-                Slider_Count.value = count;
+                Slider_Count.value = mincount;
                 Slider_Count.interactable = true;
             }
 
-            Slider_Count_OnValueChanged(count);
+            Slider_Count_OnValueChanged(mincount);
 
             List<float> probabilities = UtilTools.CalculateProbabilities(divineSenseConfig.QualityBonusChance.ToList());