改动与优化
This commit is contained in:
@@ -8,8 +8,13 @@ public class UI_Show_Anim : MonoBehaviour
|
||||
private void OnEnable()
|
||||
{
|
||||
Clear();
|
||||
transform.localScale = Vector3.zero;
|
||||
transform.DOScale(1, animTime_Scale).SetUpdate(true);
|
||||
RectTransform rect = transform as RectTransform;
|
||||
bool canScale = rect == null || !UI_OrderedEntryAnimator.IsLayoutSensitive(rect);
|
||||
if (canScale)
|
||||
{
|
||||
transform.localScale = Vector3.zero;
|
||||
transform.DOScale(1, animTime_Scale).SetUpdate(true);
|
||||
}
|
||||
|
||||
if (gameObject.Try_Get_Component(out CanvasGroup canvasGroup))
|
||||
{
|
||||
@@ -23,7 +28,12 @@ public class UI_Show_Anim : MonoBehaviour
|
||||
public void Close()
|
||||
{
|
||||
Clear();
|
||||
transform.DOScale(0, animTime_Scale).SetUpdate(true);
|
||||
RectTransform rect = transform as RectTransform;
|
||||
bool canScale = rect == null || !UI_OrderedEntryAnimator.IsLayoutSensitive(rect);
|
||||
if (canScale)
|
||||
{
|
||||
transform.DOScale(0, animTime_Scale).SetUpdate(true);
|
||||
}
|
||||
if (gameObject.Try_Get_Component(out CanvasGroup canvasGroup))
|
||||
{
|
||||
float a = 1;
|
||||
|
||||
Reference in New Issue
Block a user