Make INotifyBuildComplete require explicit implementation

This commit is contained in:
reaperrr
2016-10-20 21:21:29 +02:00
parent d9ecba7b60
commit a6b09342bc
9 changed files with 16 additions and 10 deletions

View File

@@ -75,12 +75,17 @@ namespace OpenRA.Mods.Common.Traits.Render
return RenderSprites.NormalizeSequence(DefaultAnimation, self.GetDamageState(), sequence);
}
// TODO: Get rid of INotifyBuildComplete in favor of using the upgrade system
public virtual void BuildingComplete(Actor self)
protected virtual void OnBuildComplete(Actor self)
{
DefaultAnimation.PlayRepeating(NormalizeSequence(self, Info.Sequence));
}
// TODO: Get rid of INotifyBuildComplete in favor of using the upgrade system
void INotifyBuildComplete.BuildingComplete(Actor self)
{
OnBuildComplete(self);
}
public void PlayCustomAnimation(Actor self, string name, Action after = null)
{
DefaultAnimation.PlayThen(NormalizeSequence(self, name), () =>