PlayFacing() ext

This commit is contained in:
Chris Forbes
2009-12-06 20:14:50 +13:00
parent 6594a169d8
commit 5b970c499b
5 changed files with 14 additions and 13 deletions

View File

@@ -55,7 +55,7 @@ namespace OpenRa.Game.Traits
if (currentSequence == seq) return;
if (isFacing)
anim.PlayFetchIndex(seq, () => Util.QuantizeFacing(facing, anim.CurrentSequence.Length));
anim.PlayFacing(seq, () => facing );
else
anim.PlayRepeatingPreservingPosition(seq);
@@ -66,8 +66,7 @@ namespace OpenRa.Game.Traits
{
name = type;
anim = new Animation(type);
anim.PlayFetchIndex("stand",
() => Util.QuantizeFacing(facing, anim.CurrentSequence.Length));
anim.PlayFacing("stand", () => facing);
location = initialLocation;
speed = ((InfantryInfo)Rules.UnitInfo[name]).Speed / 2;
}