改动与优化
This commit is contained in:
@@ -250,13 +250,14 @@ public class SongSelectUI : MonoBehaviour
|
||||
root.DOKill();
|
||||
cg.DOKill();
|
||||
float moveOffset = list_Move_Offset;
|
||||
if (root.GetComponent<LayoutGroup>() != null)
|
||||
bool canMove = !UI_OrderedEntryAnimator.IsLayoutSensitive(root);
|
||||
if (!canMove)
|
||||
{
|
||||
moveOffset = 0f;
|
||||
}
|
||||
Sequence seq = DOTween.Sequence().SetUpdate(list_Use_Unscaled);
|
||||
seq.Join(cg.DOFade(0f, list_FadeOut_Time));
|
||||
if (Mathf.Abs(moveOffset) > 0.01f)
|
||||
if (canMove && Mathf.Abs(moveOffset) > 0.01f)
|
||||
{
|
||||
seq.Join(root.DOAnchorPos(listBasePos + new Vector2(-moveOffset, 0f), list_FadeOut_Time).SetEase(list_Move_Ease));
|
||||
}
|
||||
@@ -283,22 +284,23 @@ public class SongSelectUI : MonoBehaviour
|
||||
root.DOKill();
|
||||
cg.DOKill();
|
||||
float moveOffset = list_Move_Offset;
|
||||
if (root.GetComponent<LayoutGroup>() != null)
|
||||
bool canMove = !UI_OrderedEntryAnimator.IsLayoutSensitive(root);
|
||||
if (!canMove)
|
||||
{
|
||||
moveOffset = 0f;
|
||||
}
|
||||
if (Mathf.Abs(moveOffset) > 0.01f)
|
||||
if (canMove && Mathf.Abs(moveOffset) > 0.01f)
|
||||
{
|
||||
root.anchoredPosition = listBasePos + new Vector2(moveOffset, 0f);
|
||||
}
|
||||
else
|
||||
else if (canMove)
|
||||
{
|
||||
root.anchoredPosition = listBasePos;
|
||||
}
|
||||
cg.alpha = 0f;
|
||||
Sequence seq = DOTween.Sequence().SetUpdate(list_Use_Unscaled);
|
||||
seq.Join(cg.DOFade(1f, list_FadeIn_Time));
|
||||
if (Mathf.Abs(moveOffset) > 0.01f)
|
||||
if (canMove && Mathf.Abs(moveOffset) > 0.01f)
|
||||
{
|
||||
seq.Join(root.DOAnchorPos(listBasePos, list_FadeIn_Time).SetEase(list_Move_Ease));
|
||||
}
|
||||
@@ -421,6 +423,7 @@ public class SongSelectUI : MonoBehaviour
|
||||
|
||||
GameObject songButtonObj = Instantiate(songButtonPrefab, contentPanel);
|
||||
songButtonObj.transform.SetParent(contentPanel, false);
|
||||
UI_OrderedEntryAnimator.PlayFadeOnly(songButtonObj, contentPanel.childCount - 1, 0.16f, 0.01f, true);
|
||||
|
||||
SongData sd = song;
|
||||
if (SongDataLibrary.Instance != null && SongDataLibrary.Instance.IsLoaded)
|
||||
|
||||
Reference in New Issue
Block a user