mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 05:17:13 +08:00
20 lines
546 B
C#
20 lines
546 B
C#
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.UI;
|
||
|
|
|
||
|
|
namespace Prefab
|
||
|
|
{
|
||
|
|
public class TemporaryAnimatorImageUI:TemporaryAnimator
|
||
|
|
{
|
||
|
|
public UIImageAnimator imageAnimator;
|
||
|
|
public RectTransform rectTransform;
|
||
|
|
|
||
|
|
public void Init(Sprite[] sprite,float fps=3)
|
||
|
|
{
|
||
|
|
if (imageAnimator == null)
|
||
|
|
imageAnimator = GetComponentInChildren<UIImageAnimator>();
|
||
|
|
if (!imageAnimator) return;
|
||
|
|
imageAnimator.SetSprites(sprite);
|
||
|
|
imageAnimator.SetFPS(fps);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|