VRC behaviors to work on both States and SSM's.

All VRC-specific behavior helpers are now extension
functions that can be called using AacAnimatorNode
This commit is contained in:
galister
2022-12-16 21:14:31 +01:00
parent 104e0d3ac3
commit ea54506b53
5 changed files with 336 additions and 324 deletions
+6
View File
@@ -1,3 +1,5 @@
using System;
using System.Collections.Generic;
using UnityEngine;
// ReSharper disable once CheckNamespace
@@ -14,6 +16,8 @@ namespace AnimatorAsCode.V0
protected readonly AacFlStateMachine ParentMachine;
protected readonly IAacDefaultsProvider DefaultsProvider;
protected Dictionary<Type, object> behaviorCache = new Dictionary<Type, object>();
protected AacAnimatorNode(AacFlStateMachine parentMachine, IAacDefaultsProvider defaultsProvider)
{
ParentMachine = parentMachine;
@@ -53,5 +57,7 @@ namespace AnimatorAsCode.V0
SetPosition(otherPosition + new Vector3(shiftX * DefaultsProvider.Grid().x, shiftY * DefaultsProvider.Grid().y, 0));
return (TNode) this;
}
public abstract TBehaviour EnsureBehaviour<TBehaviour>() where TBehaviour : StateMachineBehaviour;
}
}