Add depth support to TileSet.

This commit is contained in:
Paul Chote
2016-04-08 14:15:26 -04:00
parent d7f140d5a3
commit 756d2428d9
5 changed files with 30 additions and 17 deletions

View File

@@ -27,6 +27,9 @@ namespace OpenRA
public readonly Color LeftColor;
public readonly Color RightColor;
public readonly float ZOffset = 0.0f;
public readonly float ZRamp = 1.0f;
public MiniYaml Save(TileSet tileSet)
{
var root = new List<MiniYamlNode>();
@@ -42,6 +45,12 @@ namespace OpenRA
if (RightColor != tileSet.TerrainInfo[TerrainType].Color)
root.Add(FieldSaver.SaveField(this, "RightColor"));
if (ZOffset != 0.0f)
root.Add(FieldSaver.SaveField(this, "ZOffset"));
if (ZRamp != 1.0f)
root.Add(FieldSaver.SaveField(this, "ZRamp"));
return new MiniYaml(tileSet.TerrainInfo[TerrainType].Type, root);
}
}