Add AacFlLayer.WithDefaultState(...) to change the default state:
- Add WithDefaultState to change the default state of a layer
This commit is contained in:
@@ -239,6 +239,12 @@ namespace AnimatorAsCode.V0
|
||||
|
||||
WithAvatarMask(avatarMask);
|
||||
}
|
||||
|
||||
public AacFlLayer WithDefaultState(AacFlState newDefaultState)
|
||||
{
|
||||
_stateMachine.WithDefaultState(newDefaultState);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public class AacFlBase
|
||||
|
||||
@@ -197,6 +197,12 @@ namespace AnimatorAsCode.V0
|
||||
{
|
||||
return new Vector3(x * _gridShiftX , y * _gridShiftY, 0);
|
||||
}
|
||||
|
||||
public AacStateMachine WithDefaultState(AacFlState newDefaultState)
|
||||
{
|
||||
_machine.defaultState = newDefaultState.State;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public class AacFlState
|
||||
|
||||
@@ -608,6 +608,7 @@ foreach (var cancelWhenNotAllowed in new[] {auto, reverse, manual, custom, done}
|
||||
- `AacFlLayer WithAvatarMask(AvatarMask avatarMask)` /// Set the Avatar Mask of the layer.
|
||||
- `void WithAvatarMaskNoTransforms()` /// Set the Avatar Mask of the layer to be an Avatar Mask which denies all transforms. The asset is generated into the container.
|
||||
- `void ResolveAvatarMask(Transform[] paths)` /// Set the Avatar Mask of the layer to be an Avatar Mask that allows the specified transforms. If `paths` is an empty array, all transforms are denied, which is effectively the same as calling `.WithAvatarMaskNoTransforms()`. The asset is generated into the container.
|
||||
- `AacFlLayer WithDefaultState(AacFlState newDefaultState)` /// Set the default state of the layer upon entry.
|
||||
|
||||
# Avatars 3.0 (AacAv3)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user