改动与优化
This commit is contained in:
@@ -202,7 +202,10 @@ public class UI_SelectSong_EnterAnim : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
CacheBase(rect);
|
||||
rect.anchoredPosition = basePos[rect] + offset;
|
||||
if (!UI_OrderedEntryAnimator.IsLayoutSensitive(rect))
|
||||
{
|
||||
rect.anchoredPosition = basePos[rect] + offset;
|
||||
}
|
||||
CanvasGroup group = EnsureCanvasGroup(rect);
|
||||
if (group != null) group.alpha = 0f;
|
||||
}
|
||||
@@ -214,7 +217,10 @@ public class UI_SelectSong_EnterAnim : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
CacheBase(rect);
|
||||
rect.localScale = baseScale[rect] * scaleMul;
|
||||
if (!UI_OrderedEntryAnimator.IsLayoutSensitive(rect))
|
||||
{
|
||||
rect.localScale = baseScale[rect] * scaleMul;
|
||||
}
|
||||
CanvasGroup group = EnsureCanvasGroup(rect);
|
||||
if (group != null) group.alpha = 0f;
|
||||
}
|
||||
@@ -268,7 +274,8 @@ public class UI_SelectSong_EnterAnim : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
CacheBase(rect);
|
||||
if (basePos.TryGetValue(rect, out Vector2 pos))
|
||||
bool layoutSensitive = UI_OrderedEntryAnimator.IsLayoutSensitive(rect);
|
||||
if (!layoutSensitive && basePos.TryGetValue(rect, out Vector2 pos))
|
||||
{
|
||||
enterSeq.Insert(at, rect.DOAnchorPos(pos, time).SetEase(ease).SetUpdate(useUnscaledTime));
|
||||
}
|
||||
@@ -286,7 +293,8 @@ public class UI_SelectSong_EnterAnim : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
CacheBase(rect);
|
||||
if (baseScale.TryGetValue(rect, out Vector3 scale))
|
||||
bool layoutSensitive = UI_OrderedEntryAnimator.IsLayoutSensitive(rect);
|
||||
if (!layoutSensitive && baseScale.TryGetValue(rect, out Vector3 scale))
|
||||
{
|
||||
enterSeq.Insert(at, rect.DOScale(scale, time).SetEase(ease).SetUpdate(useUnscaledTime));
|
||||
}
|
||||
@@ -320,12 +328,13 @@ public class UI_SelectSong_EnterAnim : MonoBehaviour
|
||||
if (!rect.gameObject.activeSelf) return;
|
||||
|
||||
CacheBase(rect);
|
||||
if (basePos.TryGetValue(rect, out Vector2 pos))
|
||||
bool layoutSensitive = UI_OrderedEntryAnimator.IsLayoutSensitive(rect);
|
||||
if (!layoutSensitive && basePos.TryGetValue(rect, out Vector2 pos))
|
||||
{
|
||||
rect.anchoredPosition = pos;
|
||||
}
|
||||
|
||||
if (applyScale && baseScale.TryGetValue(rect, out Vector3 scale))
|
||||
if (!layoutSensitive && applyScale && baseScale.TryGetValue(rect, out Vector3 scale))
|
||||
{
|
||||
rect.localScale = scale;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user