Example #1
0
        public void PlayAnimation(string name)
        {
            _currentClip = _skin.AnimationClips[name];

            _player.StartClip(_currentClip);
        }
        public void StartClip(AnimationClip clip, bool looped)
        {
            if (clip == null)
                throw new ArgumentNullException("clip");

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

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