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:
reaperrr
2015-07-13 01:36:42 +02:00
parent 1d3cfcf378
commit 006e66a3c3
17 changed files with 83 additions and 67 deletions

View File

@@ -16,12 +16,10 @@ using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits
{
public class WithVoxelWalkerBodyInfo : ITraitInfo, IQuantizeBodyOrientationInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo>
public class WithVoxelWalkerBodyInfo : ITraitInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo>
{
public readonly int TickRate = 5;
public object Create(ActorInitializer init) { return new WithVoxelWalkerBody(init.Self, this); }
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; }
}
public class WithVoxelWalkerBody : IAutoSelectionSize, ITick