Fix variable ordering.
This commit is contained in:
@@ -19,6 +19,8 @@ namespace OpenRA.Mods.Common.Graphics
|
|||||||
public int Length { get { return trail.Length; } }
|
public int Length { get { return trail.Length; } }
|
||||||
|
|
||||||
readonly World world;
|
readonly World world;
|
||||||
|
readonly Color color;
|
||||||
|
readonly int zOffset;
|
||||||
|
|
||||||
// Store trail positions in a circular buffer
|
// Store trail positions in a circular buffer
|
||||||
readonly WPos[] trail;
|
readonly WPos[] trail;
|
||||||
@@ -26,9 +28,6 @@ namespace OpenRA.Mods.Common.Graphics
|
|||||||
int length;
|
int length;
|
||||||
int skip;
|
int skip;
|
||||||
|
|
||||||
readonly Color color;
|
|
||||||
readonly int zOffset;
|
|
||||||
|
|
||||||
public ContrailRenderable(World world, Color color, int length, int skip, int zOffset)
|
public ContrailRenderable(World world, Color color, int length, int skip, int zOffset)
|
||||||
: this(world, new WPos[length], 0, 0, skip, color, zOffset) { }
|
: this(world, new WPos[length], 0, 0, skip, color, zOffset) { }
|
||||||
|
|
||||||
|
|||||||
@@ -25,19 +25,19 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
class LightPaletteRotator : ITick, IPaletteModifier
|
class LightPaletteRotator : ITick, IPaletteModifier
|
||||||
{
|
{
|
||||||
float t = 0;
|
|
||||||
public void Tick(Actor self)
|
|
||||||
{
|
|
||||||
t += .5f;
|
|
||||||
}
|
|
||||||
|
|
||||||
readonly LightPaletteRotatorInfo info;
|
readonly LightPaletteRotatorInfo info;
|
||||||
|
float t = 0;
|
||||||
|
|
||||||
public LightPaletteRotator(LightPaletteRotatorInfo info)
|
public LightPaletteRotator(LightPaletteRotatorInfo info)
|
||||||
{
|
{
|
||||||
this.info = info;
|
this.info = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Tick(Actor self)
|
||||||
|
{
|
||||||
|
t += .5f;
|
||||||
|
}
|
||||||
|
|
||||||
public void AdjustPalette(IReadOnlyDictionary<string, MutablePalette> palettes)
|
public void AdjustPalette(IReadOnlyDictionary<string, MutablePalette> palettes)
|
||||||
{
|
{
|
||||||
foreach (var pal in palettes)
|
foreach (var pal in palettes)
|
||||||
|
|||||||
@@ -25,10 +25,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
class WaterPaletteRotation : ITick, IPaletteModifier
|
class WaterPaletteRotation : ITick, IPaletteModifier
|
||||||
{
|
{
|
||||||
float t = 0;
|
|
||||||
|
|
||||||
readonly WaterPaletteRotationInfo info;
|
readonly WaterPaletteRotationInfo info;
|
||||||
readonly World world;
|
readonly World world;
|
||||||
|
float t = 0;
|
||||||
|
|
||||||
public WaterPaletteRotation(World world, WaterPaletteRotationInfo info)
|
public WaterPaletteRotation(World world, WaterPaletteRotationInfo info)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readonly RenderSpritesInfo info;
|
||||||
|
string cachedImage = null;
|
||||||
Dictionary<string, AnimationWrapper> anims = new Dictionary<string, AnimationWrapper>();
|
Dictionary<string, AnimationWrapper> anims = new Dictionary<string, AnimationWrapper>();
|
||||||
|
|
||||||
public static Func<int> MakeFacingFunc(Actor self)
|
public static Func<int> MakeFacingFunc(Actor self)
|
||||||
@@ -97,9 +99,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
return () => facing.Facing;
|
return () => facing.Facing;
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly RenderSpritesInfo info;
|
|
||||||
string cachedImage = null;
|
|
||||||
|
|
||||||
public RenderSprites(Actor self)
|
public RenderSprites(Actor self)
|
||||||
{
|
{
|
||||||
info = self.Info.Traits.Get<RenderSpritesInfo>();
|
info = self.Info.Traits.Get<RenderSpritesInfo>();
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ namespace OpenRA.Mods.Common
|
|||||||
[Desc("Range between falloff steps.")]
|
[Desc("Range between falloff steps.")]
|
||||||
public readonly WRange Spread = new WRange(43);
|
public readonly WRange Spread = new WRange(43);
|
||||||
|
|
||||||
[Desc("Ranges at which each Falloff step is defined. Overrides Spread.")]
|
|
||||||
public WRange[] Range = null;
|
|
||||||
|
|
||||||
[Desc("Damage percentage at each range step")]
|
[Desc("Damage percentage at each range step")]
|
||||||
public readonly int[] Falloff = { 100, 37, 14, 5, 2, 1, 0 };
|
public readonly int[] Falloff = { 100, 37, 14, 5, 2, 1, 0 };
|
||||||
|
|
||||||
|
[Desc("Ranges at which each Falloff step is defined. Overrides Spread.")]
|
||||||
|
public WRange[] Range = null;
|
||||||
|
|
||||||
public void InitializeRange()
|
public void InitializeRange()
|
||||||
{
|
{
|
||||||
if (Range != null)
|
if (Range != null)
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
public Action AfterClose = () => { };
|
public Action AfterClose = () => { };
|
||||||
public Action<float> Animating = _ => { };
|
public Action<float> Animating = _ => { };
|
||||||
|
|
||||||
|
readonly World world;
|
||||||
|
readonly WorldRenderer worldRenderer;
|
||||||
|
readonly RadarPings radarPings;
|
||||||
|
|
||||||
float radarMinimapHeight;
|
float radarMinimapHeight;
|
||||||
int frame;
|
int frame;
|
||||||
bool hasRadar;
|
bool hasRadar;
|
||||||
@@ -46,11 +50,6 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
Sprite shroudSprite;
|
Sprite shroudSprite;
|
||||||
Shroud renderShroud;
|
Shroud renderShroud;
|
||||||
|
|
||||||
readonly World world;
|
|
||||||
readonly WorldRenderer worldRenderer;
|
|
||||||
|
|
||||||
readonly RadarPings radarPings;
|
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public RadarWidget(World world, WorldRenderer worldRenderer)
|
public RadarWidget(World world, WorldRenderer worldRenderer)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user