private void RefreshAnimation() { if (CurrentAnimation == null) { return; } CurrentAnimation.Clear(); foreach (var frameContainer in _frameContainers) { if (frameContainer.Frame != null) { CurrentAnimation.AddFrame(frameContainer.Frame); } } }
public override void Execute() { base.Execute(); Frame newFrame = CurrentAnimation.CurrentFrame; if (CurrentAnimation.Frames.Length > 1) { CurrentAnimation.AddFrame(new Frame(newFrame, false, CurrentAnimation.Bounds.Center)); //textScript.Text = currentAnimation.Frames[currentAnimation.CurrentFrameIndex].Script; } else { CurrentAnimation.InsertFrame(new Frame(newFrame, false, CurrentAnimation.Bounds.Center)); //textScript.Text = currentAnimation.Frames[currentAnimation.CurrentFrameIndex].Script; } }