From c2d2d5d3a840bf50968b3f95e304929bc62a7b70 Mon Sep 17 00:00:00 2001
From: leonard Wu <364452445@qq.com>
Date: 星期五, 03 八月 2018 21:02:26 +0800
Subject: [PATCH] 更新代码
---
System/KnapSack/Logic/EquipTip.cs | 135 +++++++++++++++++++++++++++++++++-----------
1 files changed, 100 insertions(+), 35 deletions(-)
diff --git a/System/KnapSack/Logic/EquipTip.cs b/System/KnapSack/Logic/EquipTip.cs
index 0001113..303d427 100644
--- a/System/KnapSack/Logic/EquipTip.cs
+++ b/System/KnapSack/Logic/EquipTip.cs
@@ -34,6 +34,11 @@
Text dateText;
[SerializeField]
ItemCell itemCell;
+
+ [SerializeField]
+ Text realmTitleText;
+ [SerializeField] Image realmImg;
+
#endregion
#region MidUI
@@ -148,6 +153,19 @@
{
bottomPart.gameObject.SetActive(false);
StartCoroutine(SetScrollSize());
+ StartCoroutine(CheckPlayerIsReborn());
+ }
+
+ IEnumerator CheckPlayerIsReborn()
+ {
+ int questTimes = 0;
+ while (questTimes < 5)
+ {
+ DesignDebug.Log("CheckPlayerIsReborn:寮�濮�");
+ yield return new WaitForSeconds(1);
+ questTimes += 1;
+ DesignDebug.Log("CheckPlayerIsReborn锛氱粨鏉�");
+ }
}
IEnumerator SetScrollSize()
@@ -210,42 +228,8 @@
equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
equipScoreValue.text = itemAttrData.score.ToString();
- RefreshNeedPointUI();
- needLvDes.text = Language.Get("KnapS110");
-
- if (itemAttrData.itemConfig.UseLV > 1)
- {
- needLvDes.gameObject.SetActive(true);
- needLvValue.gameObject.SetActive(true);
- }
- else
- {
- needLvDes.gameObject.SetActive(false);
- needLvValue.gameObject.SetActive(false);
- }
-
- if(itemAttrData.isHavePutLimit)
- {
- needLvValue.text = itemAttrData.itemConfig.UseLV.ToString();
- if (PlayerDatas.Instance.baseData.LV >= itemAttrData.itemConfig.UseLV)
- {
- needLvDes.color = conditionColor;
- needLvValue.color = conditionColor;
- }
- else
- {
- needLvDes.color = UIHelper.GetUIColor(TextColType.Red);
- needLvValue.color = UIHelper.GetUIColor(TextColType.Red);
- }
- }
- else
- {
- needLvValue.text = 1.ToString();
- needLvDes.color = conditionColor;
- needLvValue.color = conditionColor;
- }
-
+ CheckUselimit();
if (itemAttrData.itemConfig.ExpireTime > 0)
{
@@ -302,6 +286,87 @@
#endregion
}
+ private void CheckUselimit()
+ {
+ int[] uselimits = itemAttrData.itemConfig.UseCondiType;
+ if (uselimits == null) return;
+
+ needLvValue.gameObject.SetActive(false);
+ needLvDes.gameObject.SetActive(false);
+ realmTitleText.gameObject.SetActive(false);
+ realmImg.gameObject.SetActive(false);
+ for(int i = 0; i < needPointTextlist.Count;i++)
+ {
+ needPointTextlist[i].gameObject.SetActive(false);
+ needPointNumlist[i].gameObject.SetActive(false);
+ }
+ for (int i = 0; i < uselimits.Length; i++)
+ {
+ switch (uselimits[i])
+ {
+ case 0:
+ if (itemAttrData.itemConfig.UseLV > 1)
+ {
+ needLvValue.gameObject.SetActive(true);
+ needLvDes.gameObject.SetActive(true);
+ }
+ needLvDes.text = Language.Get("KnapS110");
+ if (itemAttrData.isHavePutLimit)
+ {
+ needLvValue.text = itemAttrData.itemConfig.UseLV.ToString();
+ if (PlayerDatas.Instance.baseData.LV >= itemAttrData.itemConfig.UseLV)
+ {
+ needLvValue.color = conditionColor;
+ needLvDes.color = conditionColor;
+ }
+ else
+ {
+ needLvValue.color = UIHelper.GetUIColor(TextColType.Red);
+ needLvDes.color = UIHelper.GetUIColor(TextColType.Red);
+ }
+ }
+ else
+ {
+ needLvValue.text = 1.ToString();
+ needLvDes.color = conditionColor;
+ needLvValue.color = conditionColor;
+ }
+
+ break;
+ case 1:
+ realmTitleText.gameObject.SetActive(true);
+ realmImg.gameObject.SetActive(true);
+ realmTitleText.text = Language.Get("RealmLimit1");
+ RealmConfig realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(itemAttrData.itemConfig.RealmLimit);
+ if (itemAttrData.itemConfig.RealmLimit <= 0)
+ {
+ realmImg.SetSprite("NoRealm");
+ }
+ else
+ {
+ if (realmConfig != null)
+ {
+ realmImg.SetSprite(realmConfig.Img);
+ }
+ }
+
+ if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
+ {
+ realmTitleText.color = conditionColor;
+ }
+ else
+ {
+ realmTitleText.color = UIHelper.GetUIColor(TextColType.Red);
+ }
+ break;
+ case 2:
+ RefreshNeedPointUI();
+ break;
+ }
+ }
+
+ }
+
private void OnDisable()
{
suirAttrCtrl.OnRefreshCell -= RefreshSuitProCell;
--
Gitblit v1.8.0