diff --git a/engine/Orbit.Engine/Sprite.cs b/engine/Orbit.Engine/Sprite.cs index 2045639..f8d9f99 100644 --- a/engine/Orbit.Engine/Sprite.cs +++ b/engine/Orbit.Engine/Sprite.cs @@ -1,4 +1,6 @@ -namespace Orbit; +using System.Linq; + +namespace Orbit.Engine; /// /// Provides the ability to render a sprite animation in a game. @@ -18,8 +20,10 @@ public class Sprite : GameObject /// How long each image should be displayed for before transitioning to the next image in the sequence. /// Whether the sprite animation should start automatically. public Sprite(IReadOnlyList imageNames, double imageDisplayDuration, bool autoStart = true) - : this(imageNames.Select(LoadImage).ToList(), imageDisplayDuration, autoStart) { + this.images = imageNames.Select(LoadImage).ToList(); + this.imageDisplayDuration = imageDisplayDuration; + this.isRunning = autoStart; } ///