don't render the idle overlay during selling

This commit is contained in:
Matthias Mailänder
2013-08-17 23:28:03 +02:00
parent 018ceb8d82
commit 1c04c6608f

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Render
public object Create(ActorInitializer init) { return new WithIdleOverlay(init.self, this); }
}
public class WithIdleOverlay : INotifyDamageStateChanged, INotifyBuildComplete
public class WithIdleOverlay : INotifyDamageStateChanged, INotifyBuildComplete, INotifySold
{
Animation overlay;
bool buildComplete;
@@ -50,6 +50,12 @@ namespace OpenRA.Mods.RA.Render
buildComplete = true;
}
public void Sold(Actor self) { }
public void Selling(Actor self)
{
buildComplete = false;
}
public void DamageStateChanged(Actor self, AttackInfo e)
{
overlay.ReplaceAnim(RenderSprites.NormalizeSequence(overlay, e.DamageState, overlay.CurrentSequence.Name));