summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Test 1/TestErika.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-09 00:58:59 +0800
committerchai <chaifix@163.com>2021-09-09 00:58:59 +0800
commit7163529a1c092e766e26b7d7b7f7b4b71583962b (patch)
treee82cf0ba0d4ba29d1987a55267125e8dc2dcc252 /Assets/Scripts/Test 1/TestErika.cs
parentaaea0c7f800a39f5e43e36e18837b174d344afdf (diff)
*misc
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);
}