Add IAacDefaultsProvider.ConfigureStateMachine(...) to position the core nodes

This commit is contained in:
Haï~
2022-05-10 20:06:47 +02:00
parent 955655fd6f
commit 77d68dcc0f
3 changed files with 15 additions and 4 deletions
@@ -11,6 +11,7 @@ namespace AnimatorAsCode.V0
string ConvertLayerName(string systemName);
string ConvertLayerNameWithSuffix(string systemName, string suffix);
Vector2 Grid();
void ConfigureStateMachine(AnimatorStateMachine stateMachine);
}
public class AacDefaultsProvider : IAacDefaultsProvider
@@ -54,5 +55,14 @@ namespace AnimatorAsCode.V0
{
return new Vector2(250, 70);
}
public void ConfigureStateMachine(AnimatorStateMachine stateMachine)
{
var grid = Grid();
stateMachine.anyStatePosition = grid * new Vector2(0, 7);
stateMachine.entryPosition = grid * new Vector2(0, -1);
stateMachine.exitPosition = grid * new Vector2(7, -1);
stateMachine.parentStateMachinePosition = grid * new Vector2(3, -1);
}
}
}