mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-22 16:21:47 -05:00
Load and test animation locomotion type
This commit is contained in:
parent
783d3ef5ef
commit
5b696e64d9
2 changed files with 8 additions and 4 deletions
|
@ -22,8 +22,9 @@ namespace OpenTS2.Files.Formats.DBPF.Scenegraph.Block
|
|||
/// </summary>
|
||||
public const double FramesPerTick = 0.03;
|
||||
|
||||
public ScenegraphResource ScenegraphResource;
|
||||
public ScenegraphResource ScenegraphResource { get; }
|
||||
|
||||
public byte LocomotionType { get; }
|
||||
public float HeadingOffset { get; }
|
||||
public float TurnRotation { get; }
|
||||
|
||||
|
@ -34,13 +35,14 @@ namespace OpenTS2.Files.Formats.DBPF.Scenegraph.Block
|
|||
/// </summary>
|
||||
public float Velocity { get; }
|
||||
|
||||
public AnimTarget[] AnimTargets;
|
||||
public AnimTarget[] AnimTargets { get; }
|
||||
|
||||
public AnimResourceConstBlock(PersistTypeInfo blockTypeInfo, ScenegraphResource scenegraphResource,
|
||||
float headingOffset, float locomotionDistance, float velocity, float turnRotation,
|
||||
byte locomotionType, float headingOffset, float locomotionDistance, float velocity, float turnRotation,
|
||||
AnimTarget[] animTargets) : base(blockTypeInfo)
|
||||
{
|
||||
ScenegraphResource = scenegraphResource;
|
||||
LocomotionType = locomotionType;
|
||||
HeadingOffset = headingOffset;
|
||||
TurnRotation = turnRotation;
|
||||
AnimTargets = animTargets;
|
||||
|
@ -666,7 +668,7 @@ namespace OpenTS2.Files.Formats.DBPF.Scenegraph.Block
|
|||
var eventDataString = reader.ReadNullTerminatedString();
|
||||
}
|
||||
|
||||
return new AnimResourceConstBlock(blockTypeInfo, resource, headingOffset, locomotionDistance,
|
||||
return new AnimResourceConstBlock(blockTypeInfo, resource, locomotionType, headingOffset, locomotionDistance,
|
||||
velocityMPT, turnRotation, animTargets);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ public class ScenegraphAnimationCodecTest
|
|||
TypeIDs.SCENEGRAPH_ANIM));
|
||||
Assert.IsNotNull(animationAsset);
|
||||
|
||||
Assert.That(animationAsset.AnimResource.LocomotionType, Is.EqualTo(0));
|
||||
Assert.That(animationAsset.AnimResource.HeadingOffset, Is.EqualTo(0.0));
|
||||
Assert.That(animationAsset.AnimResource.TurnRotation, Is.EqualTo(0.0));
|
||||
Assert.That(animationAsset.AnimResource.LocomotionDistance, Is.EqualTo(0.0));
|
||||
|
@ -117,6 +118,7 @@ public class ScenegraphAnimationCodecTest
|
|||
.GetAsset<ScenegraphAnimationAsset>(new ResourceKey("a2o-exerciseMachine-benchPress-start_anim", GroupIDs.Scenegraph,
|
||||
TypeIDs.SCENEGRAPH_ANIM));
|
||||
|
||||
Assert.That(animationAsset.AnimResource.LocomotionType, Is.EqualTo(0));
|
||||
Assert.That(animationAsset.AnimResource.HeadingOffset, Is.EqualTo(-1.570).Within(0.001));
|
||||
Assert.That(animationAsset.AnimResource.TurnRotation, Is.EqualTo(0.0));
|
||||
Assert.That(animationAsset.AnimResource.LocomotionDistance, Is.EqualTo(0.0));
|
||||
|
|
Loading…
Reference in a new issue