Exemplo n.º 1
0
		/// <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);
		}
Exemplo n.º 2
0
		/// <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;
		}
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }