Migrate traits to IRenderAnnotations.

This commit is contained in:
Paul Chote
2019-09-14 09:26:14 +01:00
committed by abcdefg30
parent edaa7918fc
commit 1dc84f48de
19 changed files with 90 additions and 79 deletions

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
public object Create(ActorInitializer init) { return new WarheadDebugOverlay(this); }
}
public class WarheadDebugOverlay : IRenderAboveShroud
public class WarheadDebugOverlay : IRenderAnnotations
{
class WHImpact
{
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits
impacts.Add(new WHImpact(pos, range, info.DisplayDuration, color));
}
IEnumerable<IRenderable> IRenderAboveShroud.RenderAboveShroud(Actor self, WorldRenderer wr)
IEnumerable<IRenderable> IRenderAnnotations.RenderAnnotations(Actor self, WorldRenderer wr)
{
foreach (var i in impacts)
{
@@ -83,6 +83,6 @@ namespace OpenRA.Mods.Common.Traits
impacts.RemoveAll(i => i.Time == 0);
}
bool IRenderAboveShroud.SpatiallyPartitionable { get { return false; } }
bool IRenderAnnotations.SpatiallyPartitionable { get { return false; } }
}
}