add ColorRamp type; change everything to use it; maps not yet upgraded

This commit is contained in:
Chris Forbes
2011-01-08 17:10:00 +13:00
parent e2ff40dc7f
commit 3426b52247
22 changed files with 163 additions and 124 deletions

View File

@@ -50,9 +50,8 @@ namespace OpenRA.Mods.RA
/* spawn a bot in this slot, "owned" by the host */
/* pick a random color for the bot */
var hue = (float)w.SharedRandom.NextDouble();
w.Map.Players[slot.MapPlayer].Color = PlayerColorRemap.ColorFromHSL(hue, 1.0f, 0.7f);
w.Map.Players[slot.MapPlayer].Color2 = PlayerColorRemap.ColorFromHSL(hue, 1.0f, 0.2f);
var hue = (byte)w.SharedRandom.Next(256);
w.Map.Players[slot.MapPlayer].ColorRamp = new ColorRamp(hue, 255, 180, 25);
/* todo: pick a random name from the pool */