CharacterParameters.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Animancer // https://kybernetik.com.au/animancer // Copyright 2022 Kybernetik //
  2. #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value.
  3. using System;
  4. using UnityEngine;
  5. namespace Animancer.Examples.AnimatorControllers.GameKit
  6. {
  7. /// <summary>The parameters that control a <see cref="Character"/>.</summary>
  8. /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/animator-controllers/3d-game-kit">3D Game Kit</see></example>
  9. /// https://kybernetik.com.au/animancer/api/Animancer.Examples.AnimatorControllers.GameKit/CharacterParameters
  10. ///
  11. [Serializable]
  12. public sealed class CharacterParameters
  13. {
  14. /************************************************************************************************************************/
  15. [SerializeField]
  16. private Vector3 _MovementDirection;
  17. public Vector3 MovementDirection
  18. {
  19. get => _MovementDirection;
  20. set => _MovementDirection = Vector3.ClampMagnitude(value, 1);
  21. }
  22. /************************************************************************************************************************/
  23. public float ForwardSpeed { get; set; }
  24. public float DesiredForwardSpeed { get; set; }
  25. public float VerticalSpeed { get; set; }
  26. /************************************************************************************************************************/
  27. }
  28. }