lzx 4 dagar sedan
förälder
incheckning
d9d4516a7c

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

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

+ 21 - 1
Assets/Res/UI/DaoYouPanel/DaoYouIdleEarningsWidget.prefab

@@ -13,7 +13,7 @@ GameObject:
   - component: {fileID: 2806877487777183867}
   m_Layer: 0
   m_HasEditorInfo: 1
-  m_Name: Text (Legacy) (3)
+  m_Name: Text_Name
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
@@ -91,6 +91,7 @@ GameObject:
   - component: {fileID: 1416651410958698966}
   - component: {fileID: 566111804867399921}
   - component: {fileID: 1790865063190693160}
+  - component: {fileID: 2734085421693591472}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: DaoYouIdleEarningsWidget
@@ -169,3 +170,22 @@ MonoBehaviour:
   topOrLeftColor: {r: 1, g: 1, b: 1, a: 1}
   bottomOrRightColor: {r: 0, g: 0, b: 0, a: 1}
   direction: 0
+--- !u!114 &2734085421693591472
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8417774369842171221}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4810a0857c909354fa00c3aafdeac753, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  data:
+  - key: Text_Name
+    gameObject: {fileID: 2806877487777183867}
+    isAssetBundle: 0
+    isList: 0
+    ListCollectorDatas: []
+  isAssetBundle: 0

+ 33 - 0
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouIdleEarningsWidget.cs

@@ -0,0 +1,33 @@
+using Core.Language;
+using Excel2Json;
+using Fort23.UTool;
+
+namespace Fort23.Mono
+{
+    [UIBinding(prefab = "DaoYouIdleEarningsWidget")]
+    public partial class DaoYouIdleEarningsWidget : UIComponent
+    {
+        private void Init()
+        {
+        }
+
+        public override void AddEvent()
+        {
+        }
+
+        public override void DelEvent()
+        {
+        }
+
+        public override void AddButtonEvent()
+        {
+        }
+
+        public void CustomInit(AccountFileInfo.DaoYouData daoYouData, int configId)
+        {
+            guajibuff guajibuff = ConfigComponent.Instance.Get<guajibuff>(configId);
+            DaoyouLevelupConfig daoyouLevelupConfig = ConfigComponent.Instance.Get<DaoyouLevelupConfig>(daoYouData.favorabilityLv);
+            Text_Name.text = $"{LanguageManager.Instance.Text(guajibuff.name)}+{daoyouLevelupConfig.guajiGrowup * 0.01f * guajibuff.GivingRate}%";
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouIdleEarningsWidget.cs.meta

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

+ 29 - 0
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouIdleEarningsWidgetData.cs

@@ -0,0 +1,29 @@
+using Fort23.Core;
+using Fort23.UTool;
+using UnityEngine.UI;
+using UnityEngine;
+using System.Collections.Generic;
+namespace Fort23.Mono
+{
+	public partial class DaoYouIdleEarningsWidget 
+	{
+	  #region 自定义数据 
+	  private Text _Text_Name;
+	  public Text Text_Name
+	   {
+	   get{
+	      if (_Text_Name == null)
+	       {
+	         _Text_Name  = GetUIUnit<Text>("Text_Name"); 
+	       }
+	      return _Text_Name;
+	     }
+	   }
+	  #endregion 自定义数据结束 
+	 public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
+	{
+	 await base.SetUIGameObject(gObjectPoolInterface);
+	 Init();
+	}
+	}
+}

+ 11 - 0
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouIdleEarningsWidgetData.cs.meta

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

+ 23 - 0
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouInfoPanel.cs

@@ -19,6 +19,7 @@ namespace Fort23.Mono
         List<WidgetItem> widgetItems = new List<WidgetItem>();
         List<WidgetItem> giveWidgetItems = new List<WidgetItem>();
         List<DaoYouLevelWidget> _daoYouLevelWidgets = new List<DaoYouLevelWidget>();
+        List<DaoYouIdleEarningsWidget> _daoYouIdleEarningsWidgets = new List<DaoYouIdleEarningsWidget>();
 
         private DaoyouGiftConfig[] daoyouGiftConfigs;
 
@@ -129,6 +130,13 @@ namespace Fort23.Mono
 
             _daoYouLevelWidgets.Clear();
 
+            foreach (var daoYouIdleEarningsWidget in _daoYouIdleEarningsWidgets)
+            {
+                UIManager.Instance.DormancyGComponent(daoYouIdleEarningsWidget);
+            }
+
+            _daoYouIdleEarningsWidgets.Clear();
+
             Text_Name.text = LanguageManager.Instance.Text(_daoyouModelConfig.name);
 
             int index = 0;
@@ -143,6 +151,14 @@ namespace Fort23.Mono
             Text_Desc.text = LanguageManager.Instance.Text(_daoyouModelConfig.des[index]);
 
 
+            foreach (var i in _daoyouModelConfig.guajiBuffID)
+            {
+                DaoYouIdleEarningsWidget daoYouIdleEarningsWidget = await UIManager.Instance.CreateGComponent<DaoYouIdleEarningsWidget>(null, GuajiContent);
+                daoYouIdleEarningsWidget.CustomInit(daoYouData, i);
+                _daoYouIdleEarningsWidgets.Add(daoYouIdleEarningsWidget);
+            }
+
+
             DaoyouLevelupConfig currentDaoyouLevelupConfig = ConfigComponent.Instance.Get<DaoyouLevelupConfig>(daoYouData.favorabilityLv);
             Text_CurrentName.text = LanguageManager.Instance.Text(currentDaoyouLevelupConfig.name);
             Text_CurrentLevel.text = daoYouData.favorabilityLv.ToString();
@@ -293,6 +309,13 @@ namespace Fort23.Mono
 
             _daoYouLevelWidgets.Clear();
 
+            foreach (var daoYouIdleEarningsWidget in _daoYouIdleEarningsWidgets)
+            {
+                UIManager.Instance.DormancyGComponent(daoYouIdleEarningsWidget);
+            }
+
+            _daoYouIdleEarningsWidgets.Clear();
+
             ClosePoolGive();
 
             base.Close();