某些修改
This commit is contained in:
@@ -31,6 +31,9 @@ namespace Ichni.Editor
|
||||
|
||||
public void SetTab(GameElement targetElement, GameElement parentElement)
|
||||
{
|
||||
tabMainRect.localScale = Vector3.zero;
|
||||
StartCoroutine(WindowAnim.ShowPanelOnScale(tabMainRect.gameObject));
|
||||
|
||||
connectedGameElement = targetElement;
|
||||
tabButtonText.text = targetElement.elementName;
|
||||
targetElement.connectedTab = this;
|
||||
@@ -98,10 +101,10 @@ namespace Ichni.Editor
|
||||
{
|
||||
this.childTabList.RemoveAll(s => s == null);
|
||||
isExpanded = !isExpanded;
|
||||
|
||||
StartCoroutine(ExpandAnim());
|
||||
if (isExpanded)
|
||||
{
|
||||
expandButton.transform.Rotate(new Vector3(0, 0, 180));
|
||||
|
||||
|
||||
for (var index = 0; index < connectedGameElement.childElementList.Count; index++)
|
||||
{
|
||||
@@ -111,7 +114,7 @@ namespace Ichni.Editor
|
||||
}
|
||||
else
|
||||
{
|
||||
expandButton.transform.Rotate(new Vector3(0, 0, 180));
|
||||
//expandButton.transform.Rotate(new Vector3(0, 0, 180));
|
||||
|
||||
for (int i = childTabList.Count - 1; i >= 0; i--)
|
||||
{
|
||||
@@ -137,5 +140,16 @@ namespace Ichni.Editor
|
||||
EditorManager.instance.uiManager.hierarchy.tabList.Remove(this);
|
||||
}
|
||||
}
|
||||
private IEnumerator ExpandAnim()
|
||||
{
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
AnimationCurveEvaluator.Evaluate(AnimationCurveType.OutCubic, i / 10f);
|
||||
//expandButton.transform.GetComponentInChildren<TMP_Text>().rectTransform.Rotate(new Vector3(0, 0, 18));
|
||||
yield return null;
|
||||
}
|
||||
expandButton.transform.GetComponentInChildren<TMP_Text>().rectTransform.localRotation = Quaternion.Euler(0, 0, isExpanded ? 180 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user