Weapon.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
  2. #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value.
  3. using UnityEngine;
  4. namespace Animancer.Samples.StateMachines
  5. {
  6. /// <summary>Holds various animations relating to the use of a weapon.</summary>
  7. ///
  8. /// <remarks>
  9. /// In a real game, this class might have other details like damage, damage type, weapon category, etc.
  10. /// It could also inherit from a base Item class for things like weight, cost, and description.
  11. /// <para></para>
  12. /// <strong>Sample:</strong>
  13. /// <see href="https://kybernetik.com.au/animancer/docs/samples/fsm/weapons">
  14. /// Weapons</see>
  15. /// </remarks>
  16. ///
  17. /// https://kybernetik.com.au/animancer/api/Animancer.Samples.StateMachines/Weapon
  18. ///
  19. [AddComponentMenu(Strings.SamplesMenuPrefix + "Weapons - Weapon")]
  20. [AnimancerHelpUrl(typeof(Weapon))]
  21. public class Weapon : MonoBehaviour
  22. {
  23. /************************************************************************************************************************/
  24. [SerializeField]
  25. private TransitionAsset[] _AttackAnimations;
  26. public TransitionAsset[] AttackAnimations => _AttackAnimations;
  27. /************************************************************************************************************************/
  28. [SerializeField]
  29. private TransitionAsset _EquipAnimation;
  30. public TransitionAsset EquipAnimation => _EquipAnimation;
  31. [SerializeField]
  32. private TransitionAsset _UnequipAnimation;
  33. public TransitionAsset UnequipAnimation => _UnequipAnimation;
  34. /************************************************************************************************************************/
  35. }
  36. }