ore is now in openra.game
This commit is contained in:
@@ -57,9 +57,9 @@ namespace OpenRa.Game.Graphics
|
||||
var location = new int2(x, y);
|
||||
var sprites = overlaySprites[o];
|
||||
var spriteIndex = 0;
|
||||
if (Map.overlayIsFence[o]) spriteIndex = NearbyFences(x, y);
|
||||
else if (Map.overlayIsOre[o]) spriteIndex = map.MapTiles[x,y].density;
|
||||
else if (Map.overlayIsGems[o]) spriteIndex = map.MapTiles[x,y].density;
|
||||
if (Ore.overlayIsFence[o]) spriteIndex = NearbyFences(x, y);
|
||||
else if (Ore.overlayIsOre[o]) spriteIndex = map.MapTiles[x,y].density;
|
||||
else if (Ore.overlayIsGems[o]) spriteIndex = map.MapTiles[x,y].density;
|
||||
spriteRenderer.DrawSprite(sprites[spriteIndex],
|
||||
Game.CellSize * (float2)location, 0);
|
||||
}
|
||||
@@ -71,8 +71,8 @@ namespace OpenRa.Game.Graphics
|
||||
bool IsFence( int x, int y )
|
||||
{
|
||||
var o = map.MapTiles[ x, y ].overlay;
|
||||
if (o < Map.overlayIsFence.Length)
|
||||
return Map.overlayIsFence[o];
|
||||
if (o < Ore.overlayIsFence.Length)
|
||||
return Ore.overlayIsFence[o];
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user