Add AacFlState.PlayableEnables(...), PlayableDisables, and PlayableSets:
- Add AacFlState.PlayableEnables(...) with 0-duration default overload. This function is exposed with the assumption that Playable Layer Control would often be used with a all-or-nothing weight. - Add AacFlState.PlayableDisables(...) with 0-duration default overload. - Add AacFlState.PlayableSets(...) to control everything about the behaviour.
This commit is contained in:
@@ -508,6 +508,26 @@ namespace AnimatorAsCode.V0
|
||||
return this;
|
||||
}
|
||||
|
||||
public AacFlState PlayableEnables(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds = 0f)
|
||||
{
|
||||
return PlayableSets(blendable, blendDurationSeconds, 1.0f);
|
||||
}
|
||||
|
||||
public AacFlState PlayableDisables(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds = 0f)
|
||||
{
|
||||
return PlayableSets(blendable, blendDurationSeconds, 0.0f);
|
||||
}
|
||||
|
||||
public AacFlState PlayableSets(VRC_PlayableLayerControl.BlendableLayer blendable, float blendDurationSeconds, float weight)
|
||||
{
|
||||
var playable = State.AddStateMachineBehaviour<VRCPlayableLayerControl>();
|
||||
playable.layer = blendable;
|
||||
playable.goalWeight = weight;
|
||||
playable.blendDuration = blendDurationSeconds;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public AacFlState MotionTime(AacFlFloatParameter floatParam)
|
||||
{
|
||||
State.timeParameterActive = true;
|
||||
|
||||
Reference in New Issue
Block a user