2020-12-10 19:51:02 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
2020-12-08 17:36:20 +01:00
|
|
|
|
|
|
|
|
|
namespace TAO.VertexAnimation
|
|
|
|
|
{
|
2020-12-16 11:59:22 +01:00
|
|
|
|
[CreateAssetMenu(fileName = "new AnimationLibrary", menuName = "VA_Animation/AnimationLibrary", order = 400)]
|
2020-12-10 19:51:02 +01:00
|
|
|
|
public class VA_AnimationLibrary : ScriptableObject
|
2020-12-08 17:36:20 +01:00
|
|
|
|
{
|
2020-12-10 19:51:02 +01:00
|
|
|
|
[SerializeField]
|
2020-12-21 23:19:05 +01:00
|
|
|
|
private List<VA_AnimationBook> animationBooks = new List<VA_AnimationBook>();
|
2020-12-08 17:36:20 +01:00
|
|
|
|
|
2020-12-10 19:51:02 +01:00
|
|
|
|
[HideInInspector]
|
|
|
|
|
public List<VA_AnimationData> animations = null;
|
|
|
|
|
|
2020-12-21 23:19:05 +01:00
|
|
|
|
public void Init()
|
2020-12-10 19:51:02 +01:00
|
|
|
|
{
|
2020-12-21 23:19:05 +01:00
|
|
|
|
animations = new List<VA_AnimationData>();
|
|
|
|
|
|
|
|
|
|
foreach (VA_AnimationBook ab in animationBooks)
|
2020-12-10 19:51:02 +01:00
|
|
|
|
{
|
2020-12-21 23:19:05 +01:00
|
|
|
|
ab.SetMaterials();
|
|
|
|
|
animations.AddRange(ab.playData.GetAnimations);
|
2020-12-10 19:51:02 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnValidate()
|
|
|
|
|
{
|
|
|
|
|
// TODO: Check for naming conflicts in AnimationBooks.
|
|
|
|
|
}
|
2020-12-08 17:36:20 +01:00
|
|
|
|
}
|
|
|
|
|
}
|