mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 03:47:13 +08:00
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/56
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);
|
|
}
|
|
}
|
|
} |