drop ISelectionColorModifier; unused
This commit is contained in:
@@ -31,19 +31,12 @@ namespace OpenRA.Traits
|
|||||||
public void RenderAfterWorld (WorldRenderer wr, Actor self)
|
public void RenderAfterWorld (WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
var bounds = self.Bounds.Value;
|
var bounds = self.Bounds.Value;
|
||||||
Color selectionColor = Color.White;
|
|
||||||
|
|
||||||
var xy = new float2(bounds.Left, bounds.Top);
|
var xy = new float2(bounds.Left, bounds.Top);
|
||||||
var Xy = new float2(bounds.Right, bounds.Top);
|
var Xy = new float2(bounds.Right, bounds.Top);
|
||||||
var xY = new float2(bounds.Left, bounds.Bottom);
|
var xY = new float2(bounds.Left, bounds.Bottom);
|
||||||
|
|
||||||
var colorResults = self.TraitsImplementing<ISelectionColorModifier>().Select(t => t.GetSelectionColorModifier(self, selectionColor)).Where(
|
wr.DrawSelectionBox(self, Color.White);
|
||||||
c => c.ToArgb() != selectionColor.ToArgb());
|
|
||||||
|
|
||||||
if (colorResults.Any())
|
|
||||||
selectionColor = colorResults.First();
|
|
||||||
|
|
||||||
wr.DrawSelectionBox(self, selectionColor);
|
|
||||||
DrawHealthBar(self, xy, Xy);
|
DrawHealthBar(self, xy, Xy);
|
||||||
DrawControlGroup(wr, self, xy);
|
DrawControlGroup(wr, self, xy);
|
||||||
DrawPips(wr, self, xY);
|
DrawPips(wr, self, xY);
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ namespace OpenRA.Traits
|
|||||||
public interface IDamageModifier { float GetDamageModifier(Actor attacker, WarheadInfo warhead); }
|
public interface IDamageModifier { float GetDamageModifier(Actor attacker, WarheadInfo warhead); }
|
||||||
public interface ISpeedModifier { decimal GetSpeedModifier(); }
|
public interface ISpeedModifier { decimal GetSpeedModifier(); }
|
||||||
public interface IFirepowerModifier { float GetFirepowerModifier(); }
|
public interface IFirepowerModifier { float GetFirepowerModifier(); }
|
||||||
public interface ISelectionColorModifier { Color GetSelectionColorModifier(Actor self, Color defaultColor); }
|
|
||||||
public interface IPalette { void InitPalette(WorldRenderer wr); }
|
public interface IPalette { void InitPalette(WorldRenderer wr); }
|
||||||
public interface IPaletteModifier { void AdjustPalette(Dictionary<string, Palette> b); }
|
public interface IPaletteModifier { void AdjustPalette(Dictionary<string, Palette> b); }
|
||||||
public interface IPips { IEnumerable<PipType> GetPips(Actor self); }
|
public interface IPips { IEnumerable<PipType> GetPips(Actor self); }
|
||||||
|
|||||||
Reference in New Issue
Block a user