less misleading name; further reduce speed of NUKE anim

This commit is contained in:
Chris Forbes
2010-03-07 14:19:05 +13:00
parent 2456739148
commit 2547045881
3 changed files with 11 additions and 11 deletions

View File

@@ -126,7 +126,7 @@ namespace OpenRA.Graphics
while( timeUntilNextFrame <= 0 )
{
tickFunc();
timeUntilNextFrame += CurrentSequence != null ? CurrentSequence.Speed : 40; // 25 fps == 40 ms
timeUntilNextFrame += CurrentSequence != null ? CurrentSequence.Tick : 40; // 25 fps == 40 ms
}
}
}

View File

@@ -25,14 +25,14 @@ namespace OpenRA.Graphics
public class Sequence
{
readonly Sprite[] sprites;
readonly int start, length, facings, speed;
readonly int start, length, facings, tick;
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 int Tick { get { return tick; } }
public Sequence(string unit, XmlElement e)
{
@@ -56,10 +56,10 @@ namespace OpenRA.Graphics
else
facings = 1;
if (e.HasAttribute("speed"))
speed = int.Parse(e.GetAttribute("speed"));
if (e.HasAttribute("tick"))
tick = int.Parse(e.GetAttribute("tick"));
else
speed = 40;
tick = 40;
}
public Sprite GetSprite( int frame )

View File

@@ -3,18 +3,18 @@
<!-- Construction Yard -->
<unit name="fact">
<sequence name="build" start="4" length="20" />
<sequence name="idle" start="0" length="4" speed="80"/>
<sequence name="idle" start="0" length="4" tick="80"/>
<sequence name="critical-build" start="28" length="20" />
<sequence name="damaged-build" start="28" length="20" />
<sequence name="critical-idle" start="48" length="1"/>
<sequence name="damaged-idle" start="24" length="4" speed="80"/>
<sequence name="damaged-idle" start="24" length="4" tick="80"/>
<sequence name="make" start="0" length="32" src="factmake" />
</unit>
<!-- Power Plant -->
<unit name="nuke">
<sequence name="idle" start="0" length="4" speed="160"/>
<sequence name="damaged-idle" start="4" length="4" speed="160"/>
<sequence name="critical-idle" start="8" length="1" speed="160"/>
<sequence name="idle" start="0" length="4" tick="400"/>
<sequence name="damaged-idle" start="4" length="4" tick="400"/>
<sequence name="critical-idle" start="8" length="1" tick="400"/>
<sequence name="make" start="0" length="*" src="nukemake" />
</unit>
<!-- Tiberium Refinary -->