Weapon.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 UnityEngine;
  4. namespace Animancer.Examples.StateMachines
  5. {
  6. /// <summary>
  7. /// Holds various animations relating to the use of a weapon. In a real game, this class might have other details
  8. /// like damage, damage type, weapon category, etc. It could also inherit from a base Item class for things like
  9. /// weight, cost, and description.
  10. /// </summary>
  11. /// <example><see href="https://kybernetik.com.au/animancer/docs/examples/fsm/weapons">Weapons</see></example>
  12. /// https://kybernetik.com.au/animancer/api/Animancer.Examples.StateMachines/Weapon
  13. ///
  14. [AddComponentMenu(Strings.ExamplesMenuPrefix + "Weapons - Weapon")]
  15. [HelpURL(Strings.DocsURLs.ExampleAPIDocumentation + nameof(StateMachines) + "/" + nameof(Weapon))]
  16. public sealed class Weapon : MonoBehaviour
  17. {
  18. /************************************************************************************************************************/
  19. [SerializeField]
  20. private ClipTransition[] _AttackAnimations;
  21. public ClipTransition[] AttackAnimations => _AttackAnimations;
  22. /************************************************************************************************************************/
  23. [SerializeField]
  24. private ClipTransition _EquipAnimation;
  25. public ClipTransition EquipAnimation => _EquipAnimation;
  26. [SerializeField]
  27. private ClipTransition _UnequipAnimation;
  28. public ClipTransition UnequipAnimation => _UnequipAnimation;
  29. /************************************************************************************************************************/
  30. }
  31. }