CurveBehaviour.cs 430 B

123456789101112131415161718
  1. using UnityEngine;
  2. namespace XGame.Framework.Map
  3. {
  4. public class CurveBehaviour : MonoBehaviour
  5. {
  6. [SerializeField]
  7. private AnimationCurve[] _curves;
  8. public int Count => _curves?.Length ?? 0;
  9. public AnimationCurve GetCurve(int index)
  10. {
  11. if (_curves == null || index >= _curves.Length)
  12. return null;
  13. return _curves[index];
  14. }
  15. }
  16. }