Пример #1
0
        public void StartClip(SpriteSheetAnimationClip clip, int frame = 0)
        {
            if (clip != null && clip != currentClip)
            {
                currentTime     = TimeSpan.Zero + AnimationOffSet;
                CurrentKeyframe = frame;

                currentClip = clip;

                _IsPlaying = true;
            }
        }
Пример #2
0
        public SpriteSheetAnimationClip(SpriteSheetAnimationClip clip)
        {
            Name     = clip.Name;
            Duration = clip.Duration;

            SpriteSheetKeyFrame[] frames = new SpriteSheetKeyFrame[clip.Keyframes.Count];
            clip.Keyframes.CopyTo(frames, 0);

            Keyframes = new List <SpriteSheetKeyFrame>();
            Keyframes.AddRange(frames);

            Looped = clip.Looped;
        }