// Animancer // Copyright 2020 Kybernetik // using UnityEngine; using UnityEngine.Playables; namespace Animancer { /// /// Interface for objects that manage a . /// public interface IPlayableWrapper { /************************************************************************************************************************/ /// The object which receives the output of the . IPlayableWrapper Parent { get; } /// The managed by this object. Playable Playable { get; } /// /// Indicates whether child playables should stay connected to the graph at all times. /// /// If false, playables will be disconnected from the graph while they are at 0 weight to stop it from /// evaluating them every frame which is generally more efficient. /// bool KeepChildrenConnected { get; } /// /// How fast the is advancing every frame. /// /// 1 is the normal speed. /// /// A negative value will play the animation backwards. /// /// Animancer Lite does not allow this value to be changed in a runtime build. /// /// /// /// /// void PlayAnimation(AnimancerComponent animancer, AnimationClip clip) /// { /// var state = animancer.Play(clip); /// /// state.Speed = 1;// Normal speed. /// state.Speed = 2;// Double speed. /// state.Speed = 0.5f;// Half speed. /// state.Speed = -1;// Normal speed playing backwards. /// } /// /// float Speed { get; set; } /************************************************************************************************************************/ } }