diff --git a/MLEM/Animations/SpriteAnimation.cs b/MLEM/Animations/SpriteAnimation.cs
index d35b29f..a85af4c 100644
--- a/MLEM/Animations/SpriteAnimation.cs
+++ b/MLEM/Animations/SpriteAnimation.cs
@@ -112,13 +112,17 @@ namespace MLEM.Animations {
///
/// The game's time
public void Update(GameTime time) {
- this.SetTime(this.TimeIntoAnimation + time.ElapsedGameTime.TotalSeconds * this.SpeedMultiplier);
+ this.Update(time.ElapsedGameTime);
}
-
- internal void SetTime(double totalTime) {
+
+ ///
+ /// Updates this animation, causing to be increased and the to be updated.
+ ///
+ /// The amount of time that has passed
+ public void Update(TimeSpan elapsed) {
if (this.IsFinished || this.IsPaused)
return;
- this.TimeIntoAnimation = totalTime;
+ this.TimeIntoAnimation += elapsed.TotalSeconds * this.SpeedMultiplier;
if (this.TimeIntoAnimation >= this.TotalTime) {
if (!this.IsLooping) {
this.IsFinished = true;
diff --git a/MLEM/Animations/SpriteAnimationGroup.cs b/MLEM/Animations/SpriteAnimationGroup.cs
index c52bba8..e7f8146 100644
--- a/MLEM/Animations/SpriteAnimationGroup.cs
+++ b/MLEM/Animations/SpriteAnimationGroup.cs
@@ -62,11 +62,16 @@ namespace MLEM.Animations {
return this;
}
- ///
+ ///
public void Update(GameTime time) {
+ this.Update(time.ElapsedGameTime);
+ }
+
+ ///
+ public void Update(TimeSpan elapsed) {
this.FindAnimationToPlay();
if (this.CurrAnimation != null)
- this.CurrAnimation.Animation.Update(time);
+ this.CurrAnimation.Animation.Update(elapsed);
}
///