Exemple #1
0
 public void play(AnimationClip clip, float startFrame,
                     float endFrame, bool loop)
 {
     this.currentClip = clip;
     startTime = TimeSpan.FromMilliseconds(startFrame / fps * 1000);
     endTime = TimeSpan.FromMilliseconds(endFrame / fps * 1000);
     currentTime = startTime;
     isLooping = loop;
     keyframeList = currentClip.Keyframes;
 }
        /// <summary>
        /// Starts decoding the specified animation clip.
        /// </summary>
        public void StartClip(AnimationClip clip)
        {
            if (clip == null)
                throw new ArgumentNullException("clip");

            currentClipValue = clip;
            currentTimeValue = TimeSpan.Zero;
            currentKeyframe = 0;

            // Initialize bone transforms to the bind pose.
            skinningDataValue.BindPose.CopyTo(boneTransforms, 0);
        }