don't render the idle overlay during selling
This commit is contained in:
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
public object Create(ActorInitializer init) { return new WithIdleOverlay(init.self, this); }
|
public object Create(ActorInitializer init) { return new WithIdleOverlay(init.self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WithIdleOverlay : INotifyDamageStateChanged, INotifyBuildComplete
|
public class WithIdleOverlay : INotifyDamageStateChanged, INotifyBuildComplete, INotifySold
|
||||||
{
|
{
|
||||||
Animation overlay;
|
Animation overlay;
|
||||||
bool buildComplete;
|
bool buildComplete;
|
||||||
@@ -50,6 +50,12 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
buildComplete = true;
|
buildComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Sold(Actor self) { }
|
||||||
|
public void Selling(Actor self)
|
||||||
|
{
|
||||||
|
buildComplete = false;
|
||||||
|
}
|
||||||
|
|
||||||
public void DamageStateChanged(Actor self, AttackInfo e)
|
public void DamageStateChanged(Actor self, AttackInfo e)
|
||||||
{
|
{
|
||||||
overlay.ReplaceAnim(RenderSprites.NormalizeSequence(overlay, e.DamageState, overlay.CurrentSequence.Name));
|
overlay.ReplaceAnim(RenderSprites.NormalizeSequence(overlay, e.DamageState, overlay.CurrentSequence.Name));
|
||||||
|
|||||||
Reference in New Issue
Block a user