Add AacFlState.WithCycleOffset(...), WithCycleOffsetSetTo, and WithSpeedSetTo:
- Add AacFlState.WithCycleOffset(...) - Add AacFlState.WithCycleOffsetSetTo(...) which takes a fixed value. - Add AacFlState.WithSpeedSetTo(...) which takes a fixed value. AacFlState.WithSpeed(...) already exists.
This commit is contained in:
@@ -536,6 +536,22 @@ namespace AnimatorAsCode.V0
|
||||
return this;
|
||||
}
|
||||
|
||||
public AacFlState WithCycleOffset(AacFlFloatParameter floatParam)
|
||||
{
|
||||
State.cycleOffsetParameterActive = false;
|
||||
State.cycleOffsetParameter = floatParam.Name;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public AacFlState WithCycleOffsetSetTo(float cycleOffset)
|
||||
{
|
||||
State.cycleOffsetParameterActive = false;
|
||||
State.cycleOffset = cycleOffset;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private void SettingElementTo(TrackingElement element, VRC_AnimatorTrackingControl.TrackingType target)
|
||||
{
|
||||
switch (element)
|
||||
@@ -604,8 +620,16 @@ namespace AnimatorAsCode.V0
|
||||
|
||||
public AacFlState WithSpeed(AacFlFloatParameter parameter)
|
||||
{
|
||||
State.speedParameter = parameter.Name;
|
||||
State.speedParameterActive = true;
|
||||
State.speedParameter = parameter.Name;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public AacFlState WithSpeedSetTo(float speed)
|
||||
{
|
||||
State.speedParameterActive = false;
|
||||
State.speed = speed;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -668,7 +668,10 @@ foreach (var cancelWhenNotAllowed in new[] {auto, reverse, manual, custom, done}
|
||||
- `AacFlState WithAnimation(AacFlClip clip)` /// Set a specific clip for the state. See `(AacFlBase).NewClip()` and similar.
|
||||
- `AacFlState MotionTime(AacFlFloatParameter floatParam)` /// Set the Motion Time, formerly known as Normalized Time.
|
||||
- `AacFlState WithSpeed(AacFlFloatParameter parameter)` /// Set the Speed.
|
||||
- `AacFlState WithSpeedSetTo(float speed)` /// Set the Speed to a specific value.
|
||||
- `AacFlState WithWriteDefaultsSetTo(bool shouldWriteDefaults)` /// Set Write Defaults. If you need to do this to many states, consider changing the AacConfiguration DefaultsProvider when creating Animator As Code.
|
||||
- `AacFlState WithCycleOffset(AacFlFloatParameter floatParam)` /// Set the Cycle Offset.
|
||||
- `AacFlState WithCycleOffsetSetTo(float cycleOffset)` /// Set the Cycle Offset to a specific value.
|
||||
|
||||
## Transitions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user