改动与优化
This commit is contained in:
@@ -103,8 +103,11 @@ public class loadSettlementTeamPrefab : MonoBehaviour
|
||||
var rectTransform = go.GetComponent<RectTransform>();
|
||||
if (rectTransform != null)
|
||||
{
|
||||
rectTransform.anchoredPosition = Vector2.zero;
|
||||
rectTransform.sizeDelta = Vector2.zero;
|
||||
if (!UI_OrderedEntryAnimator.IsLayoutSensitive(rectTransform))
|
||||
{
|
||||
rectTransform.anchoredPosition = Vector2.zero;
|
||||
rectTransform.sizeDelta = Vector2.zero;
|
||||
}
|
||||
spawnedCardRoots.Add(rectTransform);
|
||||
}
|
||||
|
||||
@@ -296,10 +299,15 @@ public class loadSettlementTeamPrefab : MonoBehaviour
|
||||
CanvasGroup group = GetOrAddCanvasGroup(rt.transform);
|
||||
if (group != null) group.alpha = 0f;
|
||||
|
||||
rt.anchoredPosition = new Vector2(basePos.x + offsetX, basePos.y);
|
||||
bool canMove = !UI_OrderedEntryAnimator.IsLayoutSensitive(rt);
|
||||
if (canMove)
|
||||
{
|
||||
rt.anchoredPosition = new Vector2(basePos.x + offsetX, basePos.y);
|
||||
}
|
||||
|
||||
float startAt = i * stagger; // top -> bottom (sibling order)
|
||||
allySlotEntrySequence.Insert(startAt, rt.DOAnchorPos(basePos, duration).SetEase(allySlotEntryEase).SetUpdate(allySlotEntryUseUnscaledTime));
|
||||
if (canMove)
|
||||
allySlotEntrySequence.Insert(startAt, rt.DOAnchorPos(basePos, duration).SetEase(allySlotEntryEase).SetUpdate(allySlotEntryUseUnscaledTime));
|
||||
if (group != null)
|
||||
allySlotEntrySequence.Insert(startAt, group.DOFade(1f, duration).SetEase(allySlotEntryEase).SetUpdate(allySlotEntryUseUnscaledTime));
|
||||
}
|
||||
@@ -336,7 +344,10 @@ public class loadSettlementTeamPrefab : MonoBehaviour
|
||||
if (rt == null) continue;
|
||||
|
||||
if (i < spawnedCardBasePositions.Count)
|
||||
rt.anchoredPosition = spawnedCardBasePositions[i];
|
||||
{
|
||||
if (!UI_OrderedEntryAnimator.IsLayoutSensitive(rt))
|
||||
rt.anchoredPosition = spawnedCardBasePositions[i];
|
||||
}
|
||||
SetCanvasAlpha(rt.transform, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user