2025-09-06 12:25:55 +08:00
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
namespace Prefab
|
|
|
|
{
|
|
|
|
public class TemporaryAnimatorImageUI:TemporaryAnimator
|
|
|
|
{
|
|
|
|
public UIImageAnimator imageAnimator;
|
2025-09-08 00:13:12 +08:00
|
|
|
public RectTransform rectTransform;
|
|
|
|
|
2025-09-06 12:25:55 +08:00
|
|
|
public void Init(Sprite[] sprite,float fps=3)
|
|
|
|
{
|
|
|
|
if (imageAnimator == null)
|
|
|
|
imageAnimator = GetComponentInChildren<UIImageAnimator>();
|
|
|
|
if (!imageAnimator) return;
|
|
|
|
imageAnimator.SetSprites(sprite);
|
|
|
|
imageAnimator.SetFPS(fps);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|