custom animation framerates
This commit is contained in:
@@ -25,13 +25,14 @@ namespace OpenRA.Graphics
|
||||
public class Sequence
|
||||
{
|
||||
readonly Sprite[] sprites;
|
||||
readonly int start, length, facings;
|
||||
readonly int start, length, facings, speed;
|
||||
|
||||
public readonly string Name;
|
||||
public int Start { get { return start; } }
|
||||
public int End { get { return start + length; } }
|
||||
public int Length { get { return length; } }
|
||||
public int Facings { get { return facings; } }
|
||||
public int Speed { get { return speed; } }
|
||||
|
||||
public Sequence(string unit, XmlElement e)
|
||||
{
|
||||
@@ -54,6 +55,11 @@ namespace OpenRA.Graphics
|
||||
facings = int.Parse( e.GetAttribute( "facings" ) );
|
||||
else
|
||||
facings = 1;
|
||||
|
||||
if (e.HasAttribute("speed"))
|
||||
speed = int.Parse(e.GetAttribute("speed"));
|
||||
else
|
||||
speed = 40;
|
||||
}
|
||||
|
||||
public Sprite GetSprite( int frame )
|
||||
|
||||
Reference in New Issue
Block a user