Rename RangeCircleRenderable to RangeCircleAnnotationRenderable.

This commit is contained in:
Paul Chote
2019-09-15 12:35:40 +01:00
committed by abcdefg30
parent 81d9b705a6
commit 8e280ef0a7
9 changed files with 18 additions and 18 deletions

View File

@@ -227,7 +227,7 @@ namespace OpenRA.Mods.Cnc.Traits
if (!self.Trait<PortableChrono>().Info.HasDistanceLimit)
yield break;
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
self.CenterPosition,
WDist.FromCells(self.Trait<PortableChrono>().Info.MaxDistance),
0,

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Cnc.Traits
var jamsMissiles = ai.TraitInfoOrDefault<JamsMissilesInfo>();
if (jamsMissiles != null)
{
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
centerPosition,
jamsMissiles.Range,
0,
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Cnc.Traits
var jamsMissiles = self.Info.TraitInfoOrDefault<JamsMissilesInfo>();
if (jamsMissiles != null)
{
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
self.CenterPosition,
jamsMissiles.Range,
0,

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Cnc.Traits
.DefaultIfEmpty(WDist.Zero)
.Max();
var localRangeRenderable = new RangeCircleRenderable(
var localRangeRenderable = new RangeCircleAnnotationRenderable(
centerPosition,
localRange,
0,
@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Cnc.Traits
if (!self.Owner.IsAlliedWith(self.World.RenderPlayer))
yield break;
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
self.CenterPosition,
range,
0,

View File

@@ -119,14 +119,14 @@ namespace OpenRA.Mods.Cnc.Traits
{
foreach (var a in instance.Instances.Where(i => !i.IsTraitPaused))
{
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
a.Self.CenterPosition,
attack.GetMinimumRange(),
0,
Color.Red,
Color.FromArgb(96, Color.Black));
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
a.Self.CenterPosition,
attack.GetMaximumRange(),
0,

View File

@@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Graphics
wcr.DrawLine(center, end, 1, Color.FromArgb(alpha, color));
}
RangeCircleRenderable.DrawRangeCircle(wr, centerPosition, radius, 1, color, 3, contrastColor);
RangeCircleAnnotationRenderable.DrawRangeCircle(wr, centerPosition, radius, 1, color, 3, contrastColor);
}
public void RenderDebugGeometry(WorldRenderer wr) { }

View File

@@ -14,7 +14,7 @@ using OpenRA.Primitives;
namespace OpenRA.Mods.Common.Graphics
{
public struct RangeCircleRenderable : IRenderable, IFinalizedRenderable
public struct RangeCircleAnnotationRenderable : IRenderable, IFinalizedRenderable
{
const int RangeCircleSegments = 32;
static readonly Int32Matrix4x4[] RangeCircleStartRotations = Exts.MakeArray(RangeCircleSegments, i => WRot.FromFacing(8 * i).AsMatrix());
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Graphics
readonly Color color;
readonly Color contrastColor;
public RangeCircleRenderable(WPos centerPosition, WDist radius, int zOffset, Color color, Color contrastColor)
public RangeCircleAnnotationRenderable(WPos centerPosition, WDist radius, int zOffset, Color color, Color contrastColor)
{
this.centerPosition = centerPosition;
this.radius = radius;
@@ -40,9 +40,9 @@ namespace OpenRA.Mods.Common.Graphics
public int ZOffset { get { return zOffset; } }
public bool IsDecoration { get { return true; } }
public IRenderable WithPalette(PaletteReference newPalette) { return new RangeCircleRenderable(centerPosition, radius, zOffset, color, contrastColor); }
public IRenderable WithZOffset(int newOffset) { return new RangeCircleRenderable(centerPosition, radius, newOffset, color, contrastColor); }
public IRenderable OffsetBy(WVec vec) { return new RangeCircleRenderable(centerPosition + vec, radius, zOffset, color, contrastColor); }
public IRenderable WithPalette(PaletteReference newPalette) { return new RangeCircleAnnotationRenderable(centerPosition, radius, zOffset, color, contrastColor); }
public IRenderable WithZOffset(int newOffset) { return new RangeCircleAnnotationRenderable(centerPosition, radius, newOffset, color, contrastColor); }
public IRenderable OffsetBy(WVec vec) { return new RangeCircleAnnotationRenderable(centerPosition + vec, radius, zOffset, color, contrastColor); }
public IRenderable AsDecoration() { return this; }
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }

View File

@@ -81,7 +81,7 @@ namespace OpenRA.Mods.Common.Traits
if (!ValidRenderPlayer())
yield break;
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
self.CenterPosition,
Info.Range,
0,

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Traits.Render
if (range == null || range.Value == WDist.Zero)
return SpriteRenderable.None;
var localRange = new RangeCircleRenderable(
var localRange = new RangeCircleAnnotationRenderable(
centerPosition,
range.Value,
0,
@@ -100,7 +100,7 @@ namespace OpenRA.Mods.Common.Traits.Render
if (range == WDist.Zero)
yield break;
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
self.CenterPosition,
range,
0,

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits.Render
{
if (EnabledByDefault)
{
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
centerPosition,
Range,
0,
@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public IEnumerable<IRenderable> RenderRangeCircle(Actor self, WorldRenderer wr, RangeCircleVisibility visibility)
{
if (Info.Visible == visibility && Visible)
yield return new RangeCircleRenderable(
yield return new RangeCircleAnnotationRenderable(
self.CenterPosition,
Info.Range,
0,