From 610139b47b8c13f421e01e7ce65172f18c6ca1b9 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 08 五月 2019 13:50:58 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Skill/ExpertSkillSelectWin.cs | 54 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/System/Skill/ExpertSkillSelectWin.cs b/System/Skill/ExpertSkillSelectWin.cs
index 68e65f0..dab09f2 100644
--- a/System/Skill/ExpertSkillSelectWin.cs
+++ b/System/Skill/ExpertSkillSelectWin.cs
@@ -28,6 +28,8 @@
[SerializeField] Button m_Close1;
[SerializeField] Button m_Close2;
+ [SerializeField] float m_Speed = 10f;
+
public static int selectSkillId = 0;
bool m_OpenDetail = false;
@@ -75,6 +77,8 @@
{
m_PositionTween.SetStartState();
m_AlphaTween.SetStartState();
+
+ m_CyclicScroll.IsPlaying = false;
m_OpenDetail = false;
@@ -137,7 +141,7 @@
}
}
- void DisplayDetail()
+ void DisplayDetail(bool animationStep = false)
{
if (selectExpert != 0)
{
@@ -156,8 +160,9 @@
m_Reiki.text = propertyConfig.Name;
m_Reiki.color = UIHelper.GetPropertyColor(property);
+ var propertyValueLabel = UIHelper.AppendColor(TextColType.Green, UIHelper.GetPropertyValue((PropertyType)property).ToString());
m_ReikiPoint.text = string.Format("鎴戠殑{0}鐏垫牴锛歿1}",
- propertyConfig.Name, UIHelper.GetPropertyValue((PropertyType)property));
+ propertyConfig.Name, propertyValueLabel);
datas.Clear();
for (int i = 1; i <= skillConfig.SkillMaxLV; i++)
@@ -168,31 +173,64 @@
}
}
- //m_LayoutElement.preferredHeight = datas.Count > 2 ? 440 : 302;
-
m_CyclicScroll.enabled = true;
m_CyclicScroll.Dispose();
m_CyclicScroll.Init(datas);
- StartCoroutine(Co_Arrange());
+
+ if (!animationStep)
+ {
+ m_LayoutElement.preferredHeight = datas.Count > 2 ? 440 : 302;
+ m_CyclicScroll.ReArrange();
+ }
+
+ StartCoroutine(Co_Arrange(animationStep, datas.Count > 2 ? 440 : 302));
}
}
- IEnumerator Co_Arrange()
+ IEnumerator Co_Arrange(bool animationStep, float height)
{
yield return null;
+ if (animationStep)
+ {
+ var start = m_LayoutElement.preferredHeight;
+ var intValue = (int)start;
+ if (start > height)
+ {
+ while (start > height)
+ {
+ start -= Time.deltaTime * m_Speed;
+ start = Mathf.Max(height, start);
+ m_LayoutElement.preferredHeight = start;
+ if (intValue != (int)start)
+ {
+ intValue = (int)start;
+ m_CyclicScroll.ReArrange();
+ }
+ yield return null;
+ }
+ yield return null;
+ m_CyclicScroll.ReArrange();
+ yield break;
+ }
+ }
m_CyclicScroll.ReArrange();
}
void DisplayButtonState()
{
+ var selectExpertSkill = 0;
+ model.TryGetExpertSkill(selectSkillId, out selectExpertSkill);
+
+ var used = selectExpertSkill == selectExpert;
+
TreasurePotential expert;
if (model.TryGetPotential(selectExpert, out expert))
{
var satisfyActive = model.SatisfyActiveExpert(selectExpert);
var activeLevel = 0;
model.TryGetExpertActiveLevel(selectExpert, out activeLevel);
- m_Select.gameObject.SetActive(activeLevel > 0 && !satisfyActive);
+ m_Select.gameObject.SetActive(activeLevel > 0 && !satisfyActive && !used);
m_Active.gameObject.SetActive(satisfyActive);
}
}
@@ -245,7 +283,7 @@
{
m_CyclicScroll.DisplayAnimation(()=>
{
- DisplayDetail();
+ DisplayDetail(true);
});
}
}
--
Gitblit v1.8.0