ore is now in openra.game

This commit is contained in:
Chris Forbes
2009-11-04 22:51:17 +13:00
parent 7acd327896
commit 66fd532db8
10 changed files with 304 additions and 150 deletions

View File

@@ -106,9 +106,6 @@ namespace OpenRa.Game.Graphics
Game.OreTime * 1000), new int2(5, 5), Color.White);
}
const float conditionYellow = 0.5f; /* todo: get these from gamerules */
const float conditionRed = 0.25f;
void DrawSelectionBox(Actor selectedUnit, Color c, bool drawHealthBar)
{
var center = selectedUnit.CenterLocation;
@@ -136,8 +133,8 @@ namespace OpenRa.Game.Graphics
lineRenderer.DrawLine(Xy + new float2(0, -2), Xy + new float2(0, -4), c, c);
var healthAmount = (float)selectedUnit.Health / selectedUnit.unitInfo.Strength;
var healthColor = (healthAmount < conditionRed) ? Color.Red
: (healthAmount < conditionYellow) ? Color.Yellow
var healthColor = (healthAmount < Rules.General.ConditionRed) ? Color.Red
: (healthAmount < Rules.General.ConditionYellow) ? Color.Yellow
: Color.LimeGreen;
var healthColor2 = Color.FromArgb(