add method to remove tile animation sequences

This commit is contained in:
Gered 2013-08-25 12:44:39 -04:00
parent 2825e9feb6
commit bce646819d

View file

@ -76,6 +76,19 @@ namespace Blarg.GameFramework.Graphics.Atlas
_animations.Add(name, sequence);
}
public void RemoveSequence(string name)
{
if (String.IsNullOrEmpty(name))
throw new ArgumentException("name");
var sequence = _animations.Get(name);
if (sequence == null)
throw new InvalidOperationException("Sequence not found.");
RestoreTextureWithOriginalTile(sequence);
_animations.Remove(name);
}
public void ResetSequence(string name)
{
if (String.IsNullOrEmpty(name))