/// <summary>Sets a mix duration when changing from the specified animation to the other. /// See TrackEntry.MixDuration.</summary> public void SetMix (Animation from, Animation to, float duration) { if (from == null) throw new ArgumentNullException("from", "from cannot be null."); if (to == null) throw new ArgumentNullException("to", "to cannot be null."); AnimationPair key = new AnimationPair(from, to); animationToMixTime.Remove(key); animationToMixTime.Add(key, duration); }
/// <summary> /// The mix duration to use when changing from the specified animation to the other, /// or the DefaultMix if no mix duration has been set. /// </summary> public float GetMix (Animation from, Animation to) { if (from == null) throw new ArgumentNullException("from", "from cannot be null."); if (to == null) throw new ArgumentNullException("to", "to cannot be null."); AnimationPair key = new AnimationPair(from, to); float duration; if (animationToMixTime.TryGetValue(key, out duration)) return duration; return defaultMix; }
public float GetMix(Animation from, Animation to) { AnimationPair key = new AnimationPair(from, to); float result; if (this.animationToMixTime.TryGetValue(key, out result)) { return(result); } return(this.defaultMix); }
public float GetMix(Animation from, Animation to) { AnimationPair key = new AnimationPair(from, to); float duration; if (animationToMixTime.TryGetValue(key, out duration)) { return(duration); } return(defaultMix); }
public float GetMix(Animation from, Animation to) { if (from == null) { throw new ArgumentNullException("from", "from cannot be null."); } if (to == null) { throw new ArgumentNullException("to", "to cannot be null."); } AnimationPair key = new AnimationPair(from, to); if (this.animationToMixTime.TryGetValue(key, out float num)) { return(num); } return(this.defaultMix); }