fix: animator not locking itself if changing percentage before ending
This commit is contained in:
parent
2b17041d49
commit
9d5f64fd19
17 changed files with 138 additions and 75 deletions
14
Assets/Scripts/FramedAnimator/View/Animation.cs
Normal file
14
Assets/Scripts/FramedAnimator/View/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