Refactored IQuantizeBodyOrientation implementation
Moved BodyOrientation and related interfaces from Game to Mods.Common. Introduced QuantizeFacingsFromSequence trait. With*Body render traits no longer implement IQuantizeBodyOrientation themselves.
This commit is contained in:
@@ -30,12 +30,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale);
|
||||
}
|
||||
|
||||
public override int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction)
|
||||
{
|
||||
var rsi = ai.Traits.Get<RenderSpritesInfo>();
|
||||
return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, faction), Sequence).Facings;
|
||||
}
|
||||
}
|
||||
|
||||
public class WithFacingSpriteBody : WithSpriteBody
|
||||
|
||||
Reference in New Issue
Block a user