From 65fd48d1dc7336d829e82ef70b082ee5081aee2f Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 27 八月 2018 15:00:27 +0800
Subject: [PATCH] [2614]神兽开发
---
System/Strengthening/GodBeastAttributes.cs | 71 +++++++++++++++++++++++++++++++++--
1 files changed, 66 insertions(+), 5 deletions(-)
diff --git a/System/Strengthening/GodBeastAttributes.cs b/System/Strengthening/GodBeastAttributes.cs
index 0f07f0c..0800be7 100644
--- a/System/Strengthening/GodBeastAttributes.cs
+++ b/System/Strengthening/GodBeastAttributes.cs
@@ -32,6 +32,9 @@
[SerializeField] Toggle m_DoubleToggle;
[SerializeField] Button m_StrengthenBtn;
+
+ [SerializeField] UIAlphaTween m_UIAlphaTween;
+ [SerializeField] Slider m_Slider;
DogzModel Dogz_model;
DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
private Dictionary<int, int> QualityLimit = new Dictionary<int, int>();
@@ -163,6 +166,7 @@
m_ExpSlider.delay = 0f;
m_ExpSlider.ResetStage();
m_ExpSlider.value = 1;
+ m_Slider.gameObject.SetActive(false);
m_ExpNum.text = DogzEquipConfig.upExpTotal + "/" + DogzEquipConfig.upExpTotal;
}
else
@@ -225,23 +229,80 @@
m_FrameNull.gameObject.SetActive(true);
m_FullLevel.SetActive(false);
int toLv = ToLv(ToExpTotal);
- m_LvNowText.text = "+"+DogZLv.ToString();
+ m_LvNowText.text = "+" + DogZLv.ToString();
if (DogZLv == toLv)
{
- m_LvNextText.text = "+"+(toLv + 1).ToString();
+ m_LvNextText.text = "+" + (toLv + 1).ToString();
}
else
{
- m_LvNextText.text = "+"+toLv.ToString();
+ m_LvNextText.text = "+" + toLv.ToString();
}
var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv);
+ int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
+ int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
if (ToExpTotal == 0)
{
+ m_Slider.gameObject.SetActive(false);
+ m_TextAttributesAdd1.gameObject.SetActive(false);
+ m_TextAttributesAdd2.gameObject.SetActive(false);
m_ExpNum.text = DogZExp + "/" + DogzEquipConfig.upExpTotal;
+ if (AttType.Length > 1)
+ {
+ m_TextAttributes1.gameObject.SetActive(true);
+ m_TextAttributes2.gameObject.SetActive(true);
+ string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
+ string StrName2 = Config.Instance.Get<PlayerPropertyConfig>(AttType[1]).Name;
+ m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
+ m_TextAttributes2.text = StrName2 + ":" + AttValue[1];
+ }
+ else
+ {
+ m_TextAttributes2.gameObject.SetActive(false);
+ string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
+ m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
+ }
}
else
{
- m_ExpNum.text = DogZExp + "+" + ToExpTotal + "/" + DogzEquipConfig.upExpTotal;
+ m_Slider.gameObject.SetActive(true);
+ if (DogZExp + ToExpTotal >= DogzEquipConfig.upExpTotal)
+ {
+ m_Slider.value = 1f;
+ }
+ else
+ {
+ m_Slider.value = (float)(DogZExp + ToExpTotal) / (float)(DogzEquipConfig.upExpTotal);
+ }
+ m_UIAlphaTween.Play();
+ var DogzEquipToConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, toLv);
+ int[] AttTypeTo = ConfigParse.GetMultipleStr<int>(DogzEquipToConfig.attType);
+ int[] AttValueTo = ConfigParse.GetMultipleStr<int>(DogzEquipToConfig.attValue);
+ string strColor = string.Format(Language.Get("DogzGreenText"), ToExpTotal);
+ m_ExpNum.text = DogZExp +strColor+ "/" + DogzEquipConfig.upExpTotal;
+ if (AttType.Length > 1)
+ {
+ m_TextAttributes1.gameObject.SetActive(true);
+ m_TextAttributes2.gameObject.SetActive(true);
+ m_TextAttributesAdd1.gameObject.SetActive(true);
+ m_TextAttributesAdd2.gameObject.SetActive(true);
+ string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
+ string StrName2 = Config.Instance.Get<PlayerPropertyConfig>(AttType[1]).Name;
+ m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
+ m_TextAttributes2.text = StrName2 + ":" + AttValue[1];
+ m_TextAttributesAdd1.text = "+" +( AttValueTo[0] - AttValue[0]);
+ m_TextAttributesAdd2.text = "+" + (AttValueTo[1] - AttValue[1]);
+ }
+ else
+ {
+ m_TextAttributes1.gameObject.SetActive(true);
+ m_TextAttributesAdd1.gameObject.SetActive(true);
+ m_TextAttributes2.gameObject.SetActive(false);
+ m_TextAttributesAdd2.gameObject.SetActive(false);
+ string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
+ m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
+ m_TextAttributesAdd1.text = "+" + (AttValueTo[0] - AttValue[0]);
+ }
}
}
@@ -253,7 +314,7 @@
return DogzLv;
}
int lv = QualityLimit[m_DogZItemModel.chinItemModel.ItemColor];
- for (int i = lv; i >=0; i--)
+ for (int i = lv; i >= 0; i--)
{
var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, i);
if (ToExpTotal < DogzEquipConfig.upExpTotal)
--
Gitblit v1.8.0