RenderBeforeWorld/RenderAfterWorld split. still need to sort out which behavior belongs where.

This commit is contained in:
Chris Forbes
2010-07-26 18:19:39 +12:00
parent 9cf8ac0c3d
commit 69d30ac71b
17 changed files with 59 additions and 31 deletions

View File

@@ -35,13 +35,18 @@ namespace OpenRA.Orders
public void Tick( World world ) {}
public void Render( World world )
public void RenderBeforeWorld(World world)
{
foreach (var a in Game.controller.selection.Actors)
{
foreach (var t in a.traits.WithInterface<IRenderSelection>())
t.Render(a);
}
foreach (var t in a.traits.WithInterface<IPreRenderSelection>())
t.RenderBeforeWorld(a);
}
public void RenderAfterWorld( World world )
{
foreach (var a in Game.controller.selection.Actors)
foreach (var t in a.traits.WithInterface<IPostRenderSelection>())
t.RenderAfterWorld(a);
}
public string GetCursor( World world, int2 xy, MouseInput mi )