Make the guts of Renderable private.

This commit is contained in:
Paul Chote
2013-05-12 03:01:11 +12:00
parent 7719ad1f2d
commit d103a187f6
11 changed files with 59 additions and 46 deletions

View File

@@ -242,13 +242,9 @@ namespace OpenRA.Mods.RA
// Unit previews
foreach (var unit in power.UnitsInRange(sourceLocation))
{
if (manager.self.Owner.Shroud.IsTargetable(unit)) {
var targetCell = unit.Location + (xy - sourceLocation);
if (manager.self.Owner.Shroud.IsTargetable(unit))
foreach (var r in unit.Render(wr))
r.Sprite.DrawAt(r.Pos - Traits.Util.CenterOfCell(unit.Location).ToFloat2() + Traits.Util.CenterOfCell(targetCell).ToFloat2(),
r.Palette.Index,
r.Scale*r.Sprite.size);
}
r.WithPxOffset((xy.ToPPos() - sourceLocation.ToPPos()).ToFloat2()).Render(wr);
}
// Unit tiles