unity脚本收集

This commit is contained in:
Abin committed 2025-08-01 10:50:57 +08:00
1 parent ab57544ef5
commit d88804cd63
16 files changed
+1325 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class ScaleAniChild : MonoBehaviour
{
Vector3 _defaultScale = Vector3.one;
private void Awake()
{
_defaultScale = transform.localScale;
}
public void Hide()
{
transform.localScale = Vector3.zero;
}
public void Show(float delay, float aniLength, AnimationCurve cur)
{
transform.DOKill();
transform.localScale = Vector3.zero;
transform.DOScale(_defaultScale, aniLength).SetEase(cur).SetDelay(delay);
}
}