Add AacFlLayer.WithDefaultState(...) to change the default state:

- Add WithDefaultState to change the default state of a layer
This commit is contained in:
Haï~
2022-03-20 05:19:04 +01:00
parent e31fbb1586
commit 573fc7eaef
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -239,6 +239,12 @@ namespace AnimatorAsCode.V0
WithAvatarMask(avatarMask); WithAvatarMask(avatarMask);
} }
public AacFlLayer WithDefaultState(AacFlState newDefaultState)
{
_stateMachine.WithDefaultState(newDefaultState);
return this;
}
} }
public class AacFlBase public class AacFlBase
+6
View File
@@ -197,6 +197,12 @@ namespace AnimatorAsCode.V0
{ {
return new Vector3(x * _gridShiftX , y * _gridShiftY, 0); return new Vector3(x * _gridShiftX , y * _gridShiftY, 0);
} }
public AacStateMachine WithDefaultState(AacFlState newDefaultState)
{
_machine.defaultState = newDefaultState.State;
return this;
}
} }
public class AacFlState public class AacFlState
+1
View File
@@ -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. - `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 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. - `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) # Avatars 3.0 (AacAv3)