// Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2023 Kybernetik // using Object = UnityEngine.Object; namespace Animancer { /// An object which can create an and set its details. /// /// Transitions are generally used as arguments for . /// /// Documentation: Transitions /// /// https://kybernetik.com.au/animancer/api/Animancer/ITransition /// public interface ITransition : IHasKey, IPolymorphic { /************************************************************************************************************************/ /// /// Creates and returns a new . /// /// Note that using methods like will also call /// , so if you call this method manually you may want to call that method as well. Or you /// can just use . /// /// /// The first time a transition is used on an object, this method is called to create the state and register it /// in the internal dictionary using the so that it can be reused later on. /// AnimancerState CreateState(); /// The amount of time this transition should take (in seconds). float FadeDuration { get; } /// /// The which should be used when this transition is passed into /// . /// FadeMode FadeMode { get; } /// /// Called by to apply any modifications to the `state`. /// /// /// Unlike , this method is called every time the transition is used so it can do /// things like set the or starting . /// void Apply(AnimancerState state); /************************************************************************************************************************/ } /// An which creates a specific type of . /// /// Documentation: Transitions /// /// https://kybernetik.com.au/animancer/api/Animancer/ITransition_1 /// public interface ITransition : ITransition where TState : AnimancerState { /************************************************************************************************************************/ /// /// The state that was created by this object. Specifically, this is the state that was most recently /// passed into (usually by ). /// TState State { get; } /************************************************************************************************************************/ /// Creates and returns a new . new TState CreateState(); /************************************************************************************************************************/ } }