Replace INotifyBuildComplete in render traits with conditions.

This commit is contained in:
Paul Chote
2018-10-05 20:16:36 +00:00
committed by abcdefg30
parent 26b0a06a17
commit 14607f55c5
28 changed files with 152 additions and 407 deletions

View File

@@ -139,8 +139,11 @@ namespace OpenRA.Mods.Common.Traits.Render
dirty = false;
}
protected override void OnBuildComplete(Actor self)
protected override void TraitEnabled(Actor self)
{
base.TraitEnabled(self);
dirty = true;
DefaultAnimation.PlayFetchIndex(NormalizeSequence(self, Info.Sequence), () => adjacent);
UpdateNeighbours(self);
@@ -162,8 +165,6 @@ namespace OpenRA.Mods.Common.Traits.Render
{
UpdateNeighbours(self);
}
protected override void TraitEnabled(Actor self) { dirty = true; }
}
public class RuntimeNeighbourInit : IActorInit<Dictionary<CPos, string[]>>, ISuppressInitExport