Render IPreRenderSelection independently of OG.

This commit is contained in:
Paul Chote
2010-12-05 11:53:07 +13:00
parent 915cb589b3
commit c6fad7fe98
3 changed files with 10 additions and 19 deletions

View File

@@ -65,20 +65,9 @@ namespace OpenRA.Orders
}
}
public virtual void Tick(World world) { }
public void RenderBeforeWorld(WorldRenderer wr, World world)
{
foreach (var a in world.Selection.Actors)
if (!a.Destroyed)
foreach (var t in a.TraitsImplementing<IPreRenderSelection>())
t.RenderBeforeWorld(wr, a);
Game.Renderer.Flush();
}
public void RenderAfterWorld(WorldRenderer wr, World world) {}
public virtual void Tick(World world) { }
public void RenderBeforeWorld(WorldRenderer wr, World world) { }
public void RenderAfterWorld(WorldRenderer wr, World world) { }
public string GetCursor(World world, int2 xy, MouseInput mi) { return world.Map.IsInMap(xy) ? cursor : "generic-blocked"; }
}