Minor WithInfantryBody reorganisation

Move PlayStandAnimation to a more suitable position
inside the file.
This commit is contained in:
reaperrr
2020-01-16 07:31:02 +01:00
committed by abcdefg30
parent 595b6c8923
commit b839204c7f

View File

@@ -80,18 +80,6 @@ namespace OpenRA.Mods.Common.Traits.Render
move = init.Self.Trait<IMove>();
}
public void PlayStandAnimation(Actor self)
{
state = AnimationState.Waiting;
var sequence = DefaultAnimation.GetRandomExistingSequence(Info.StandSequences, Game.CosmeticRandom);
if (sequence != null)
{
var normalized = NormalizeInfantrySequence(self, sequence);
DefaultAnimation.PlayRepeating(normalized);
}
}
protected override void Created(Actor self)
{
rsm = self.TraitOrDefault<IRenderInfantrySequenceModifier>();
@@ -115,6 +103,18 @@ namespace OpenRA.Mods.Common.Traits.Render
return hasIdleSequence && !IsModifyingSequence;
}
public void PlayStandAnimation(Actor self)
{
state = AnimationState.Waiting;
var sequence = DefaultAnimation.GetRandomExistingSequence(Info.StandSequences, Game.CosmeticRandom);
if (sequence != null)
{
var normalized = NormalizeInfantrySequence(self, sequence);
DefaultAnimation.PlayRepeating(normalized);
}
}
public void Attacking(Actor self, Target target, Armament a)
{
string sequence;