14 lines
No EOL
377 B
C#
14 lines
No EOL
377 B
C#
using UnityEngine;
|
|
|
|
namespace FramedAnimator {
|
|
[CreateAssetMenu(menuName = "Framed Animation")]
|
|
public class Animation : ScriptableObject {
|
|
[SerializeField] private Sprite[] sprites;
|
|
[SerializeField] private float frameRate;
|
|
|
|
public Sprite GetFrame(int frame) => sprites[frame];
|
|
public int FrameCount => sprites.Length;
|
|
|
|
public float FrameRate => frameRate;
|
|
}
|
|
} |