summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Test 1/TestErika.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Test 1/TestErika.cs')
-rw-r--r--Assets/Scripts/Test 1/TestErika.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Assets/Scripts/Test 1/TestErika.cs b/Assets/Scripts/Test 1/TestErika.cs
index 967c3bdb..cb40b103 100644
--- a/Assets/Scripts/Test 1/TestErika.cs
+++ b/Assets/Scripts/Test 1/TestErika.cs
@@ -52,9 +52,15 @@ public class TestErika : MonoBehaviour
RootMotionProxy rootMotionProxy = erika.unit.GetOrAddComponent<RootMotionProxy>();
Animator animator = erika.unit.GetComponent<Animator>();
- AnimatorOverrideController animCtr = new AnimatorOverrideController(erika.animController);
- animCtr.name = erika.unitPrefab.name + " Override Controller";
- animator.runtimeAnimatorController = animCtr;
+ //AnimatorOverrideController animCtr = new AnimatorOverrideController(erika.animController);
+ //animCtr.name = erika.unitPrefab.name + " Override Controller";
+ //foreach(var anim in erika.actionData.actions)
+ //{
+ // animCtr[anim.Key] = anim.Value;
+ //}
+ animator.runtimeAnimatorController = erika.animController;
+
+ Debug.Assert(animator.runtimeAnimatorController is AnimatorOverrideController);
unitCtr.pcState.ChangeState(PCState.EUnitState.Idle, new PCState.IdleParam(), true);
}