Migrate traits to IRenderAnnotations.
This commit is contained in:
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public object Create(ActorInitializer init) { return new CustomTerrainDebugOverlay(init.Self, this); }
|
||||
}
|
||||
|
||||
class CustomTerrainDebugOverlay : IWorldLoaded, IChatCommand, IRenderAboveShroud
|
||||
class CustomTerrainDebugOverlay : IWorldLoaded, IChatCommand, IRenderAnnotations
|
||||
{
|
||||
const string CommandName = "debugcustomterrain";
|
||||
const string CommandDesc = "toggles the custom terrain debug overlay.";
|
||||
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Enabled ^= true;
|
||||
}
|
||||
|
||||
IEnumerable<IRenderable> IRenderAboveShroud.RenderAboveShroud(Actor self, WorldRenderer wr)
|
||||
IEnumerable<IRenderable> IRenderAnnotations.RenderAnnotations(Actor self, WorldRenderer wr)
|
||||
{
|
||||
if (!Enabled)
|
||||
yield break;
|
||||
@@ -78,6 +78,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
bool IRenderAboveShroud.SpatiallyPartitionable { get { return false; } }
|
||||
bool IRenderAnnotations.SpatiallyPartitionable { get { return false; } }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user