30 lines
617 B
C#
30 lines
617 B
C#
using DG.Tweening;
|
|
using UnityEngine;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public class SpriteDeepIn : MonoBehaviour
|
|
{
|
|
public Sprite[] spriteArr;
|
|
|
|
public float duration = 10;
|
|
|
|
private SpriteRenderer _renderer1;
|
|
private SpriteRenderer _renderer2;
|
|
|
|
private float _curProgress;
|
|
|
|
|
|
public void Play()
|
|
{
|
|
DOTween.To(() => _curProgress, value => _curProgress = value, spriteArr.Length, duration)
|
|
.SetEase(Ease.Linear)
|
|
.OnUpdate(UpdateSprite);
|
|
}
|
|
|
|
private void UpdateSprite()
|
|
{
|
|
|
|
}
|
|
}
|
|
} |