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

@@ -25,6 +25,25 @@ namespace OpenRA.Mods.Common.Traits
void PlayCustomAnimationBackwards(Actor self, string name, Action after);
}
public interface IBodyOrientation
{
WAngle CameraPitch { get; }
int QuantizedFacings { get; }
WVec LocalToWorld(WVec vec);
WRot QuantizeOrientation(Actor self, WRot orientation);
}
public interface IBodyOrientationInfo : ITraitInfo
{
WVec LocalToWorld(WVec vec);
WRot QuantizeOrientation(WRot orientation, int facings);
}
public interface IQuantizeBodyOrientationInfo : ITraitInfo
{
int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race);
}
public interface INotifyResourceClaimLost
{
void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer);