Add start and stop repair overlay animation support.

This commit is contained in:
Matthias Mailänder
2017-08-30 19:29:09 +02:00
committed by Paul Chote
parent 7160c8a1a9
commit 0018bf3063
6 changed files with 99 additions and 12 deletions

View File

@@ -33,12 +33,16 @@ namespace OpenRA.Mods.Common.Traits.Render
spriteBody = self.TraitOrDefault<WithSpriteBody>();
}
void INotifyRepair.Repairing(Actor self, Actor target)
void INotifyRepair.BeforeRepair(Actor self, Actor target) { }
void INotifyRepair.RepairTick(Actor self, Actor target)
{
if (buildComplete && spriteBody != null && !IsTraitDisabled)
spriteBody.PlayCustomAnimation(self, Info.Sequence);
}
void INotifyRepair.AfterRepair(Actor self, Actor target) { }
void INotifyBuildComplete.BuildingComplete(Actor self)
{
buildComplete = true;