Add ScreenBounds method to IRender interface.

This method is expected to return Rectangles that cover
the region where Renderables returned by Render may exist.
This commit is contained in:
Paul Chote
2017-12-05 17:40:45 +00:00
committed by reaperrr
parent 46f6263061
commit 86bfe28ade
15 changed files with 133 additions and 5 deletions

View File

@@ -71,6 +71,12 @@ namespace OpenRA.Mods.Common.Traits
return new IRenderable[] { trail };
}
IEnumerable<Rectangle> IRender.ScreenBounds(Actor self, WorldRenderer wr)
{
// Contrails don't contribute to actor bounds
yield break;
}
void INotifyAddedToWorld.AddedToWorld(Actor self)
{
trail = new ContrailRenderable(self.World, color, info.TrailWidth, info.TrailLength, 0, info.ZOffset);