clean up whitespace in CncWaterPaletteRotation
This commit is contained in:
@@ -18,22 +18,20 @@ namespace OpenRA.Mods.Cnc
|
|||||||
|
|
||||||
class CncWaterPaletteRotation : ITick, IPaletteModifier
|
class CncWaterPaletteRotation : ITick, IPaletteModifier
|
||||||
{
|
{
|
||||||
|
|
||||||
float t = 0;
|
float t = 0;
|
||||||
public void Tick(Actor self)
|
|
||||||
{
|
public void Tick(Actor self) { t += .25f; }
|
||||||
t += .25f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AdjustPalette(Dictionary<string,Palette> palettes)
|
public void AdjustPalette(Dictionary<string,Palette> palettes)
|
||||||
{
|
{
|
||||||
// Only modify the terrain palette
|
// Only modify the terrain palette
|
||||||
var pal = palettes["terrain"];
|
var pal = palettes["terrain"];
|
||||||
|
|
||||||
var copy = (uint[])pal.Values.Clone();
|
var copy = (uint[])pal.Values.Clone();
|
||||||
var rotate = (int)t % 7;
|
var rotate = (int)t % 7;
|
||||||
|
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
pal.SetColor(0x20 + (rotate + i) % 7, copy[0x20 + i]);
|
pal.SetColor(0x20 + (rotate + i) % 7, copy[0x20 + i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user