spy disguise works

This commit is contained in:
Chris Forbes
2010-01-16 15:58:35 +13:00
parent f1ff40e25b
commit 15c28efa7a
3 changed files with 21 additions and 4 deletions

View File

@@ -4,12 +4,14 @@ namespace OpenRa.Game.Graphics
{
class Animation
{
readonly string name;
string name;
public Sequence CurrentSequence { get; private set; }
int frame = 0;
bool backwards = false;
bool tickAlways;
public string Name { get { return name; } }
public Animation( string name )
{
this.name = name.ToLowerInvariant();
@@ -99,5 +101,16 @@ namespace OpenRa.Game.Graphics
}
}
}
public void ChangeImage(string newImage)
{
newImage = newImage.ToLowerInvariant();
if (name != newImage)
{
name = newImage.ToLowerInvariant();
ReplaceAnim(CurrentSequence.Name);
}
}
}
}