Allow sequences to define a custom z offset.
This commit is contained in:
@@ -29,6 +29,7 @@ namespace OpenRA.Graphics
|
||||
public int Stride { get { return stride; } }
|
||||
public int Facings { get { return facings; } }
|
||||
public int Tick { get { return tick; } }
|
||||
public readonly int ZOffset;
|
||||
|
||||
public Sequence(string unit, string name, MiniYaml info)
|
||||
{
|
||||
@@ -76,6 +77,9 @@ namespace OpenRA.Graphics
|
||||
if (d.ContainsKey("Transpose"))
|
||||
transpose = bool.Parse(d["Transpose"].Value);
|
||||
|
||||
if (d.ContainsKey("ZOffset"))
|
||||
ZOffset = int.Parse(d["ZOffset"].Value);
|
||||
|
||||
if (length > stride)
|
||||
throw new InvalidOperationException(
|
||||
"{0}: Sequence {1}.{2}: Length must be <= stride"
|
||||
|
||||
Reference in New Issue
Block a user