Move DrawTargetMarker to TargetLineRenderable.

This commit is contained in:
Paul Chote
2015-12-10 16:01:25 +00:00
parent c7a9d024b0
commit 0f1fcdaca4
3 changed files with 21 additions and 19 deletions

View File

@@ -210,20 +210,6 @@ namespace OpenRA.Graphics
new SelectionBarsRenderable(unit, true, true).Render(this);
}
public void DrawTargetMarker(Color c, float2 location)
{
var tl = new float2(-1 / Viewport.Zoom, -1 / Viewport.Zoom);
var br = new float2(1 / Viewport.Zoom, 1 / Viewport.Zoom);
var bl = new float2(tl.X, br.Y);
var tr = new float2(br.X, tl.Y);
var wlr = Game.Renderer.WorldLineRenderer;
wlr.DrawLine(location + tl, location + tr, c);
wlr.DrawLine(location + tr, location + br, c);
wlr.DrawLine(location + br, location + bl, c);
wlr.DrawLine(location + bl, location + tl, c);
}
public void RefreshPalette()
{
palette.ApplyModifiers(World.WorldActor.TraitsImplementing<IPaletteModifier>());