示例#1
0
        /// <summary>
        ///     The moral equivalent of a copy constructor
        /// </summary>
        /// <param name="parent">The animation state set parent</param>
        /// <param name="source">An animation state to copy from</param>
        public AnimationState(AnimationStateSet parent, AnimationState source)
        {
            this.parent = parent;
            CopyFrom(source);

            parent.NotifyDirty();
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="animationName"></param>
        /// <param name="parent">The animation state set parent</param>
        /// <param name="time"></param>
        /// <param name="length"></param>
        /// <param name="weight"></param>
        /// <param name="isEnabled"></param>
        public AnimationState(string animationName, AnimationStateSet parent, float time, float length, float weight,
                              bool isEnabled)
        {
            this.animationName = animationName;
            this.parent        = parent;
            this.time          = time;
            this.weight        = weight;

            // Set using Property
            IsEnabled = isEnabled;

            // set using the Length property
            Length    = length;
            this.loop = true;

            parent.NotifyDirty();
        }