feat: framed animator working with scriptable objects
This commit is contained in:
parent
339b62faf7
commit
5b60d9aa2c
144 changed files with 9496 additions and 110 deletions
14
Assets/Scripts/FramedAnimator/Animation.cs
Normal file
14
Assets/Scripts/FramedAnimator/Animation.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue