123456789101112131415161718192021222324252627282930313233343536 |
- // Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
- #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value.
- using UnityEngine;
- namespace Animancer.Samples.StateMachines
- {
- /// <summary>A <see cref="CharacterState"/> which plays an animation.</summary>
- ///
- /// <remarks>
- /// <strong>Sample:</strong>
- /// <see href="https://kybernetik.com.au/animancer/docs/samples/fsm/characters">
- /// Characters</see>
- /// </remarks>
- ///
- /// https://kybernetik.com.au/animancer/api/Animancer.Samples.StateMachines/IdleState
- ///
- [AddComponentMenu(Strings.SamplesMenuPrefix + "Characters - Idle State")]
- [AnimancerHelpUrl(typeof(IdleState))]
- public class IdleState : CharacterState
- {
- /************************************************************************************************************************/
- [SerializeField] private TransitionAsset _Animation;
- /************************************************************************************************************************/
- protected virtual void OnEnable()
- {
- Character.Animancer.Play(_Animation);
- }
- /************************************************************************************************************************/
- }
- }
|