This commit is contained in:
CortexCore
2023-11-15 23:54:54 +08:00
parent ee3ecec6cb
commit 3c837a4a33
356 changed files with 73756 additions and 26493 deletions

View File

@@ -21,9 +21,15 @@ namespace BITKit.Entities.Animation
{
base.OnAwake();
_entityEquipment.OnEquipAddressable += OnEquip;
_entityEquipment.OnUnEquipAddressable += UnEquip;
_initialRuntimeAnimatorController = unityAnimator.animator.runtimeAnimatorController;
}
private void UnEquip(string obj)
{
_runtimeAnimatorControllerBuffer.Release(_initialRuntimeAnimatorController);
}
public override void OnLateUpdate(float deltaTime)
{
if(_runtimeAnimatorControllerBuffer.TryGetRelease(out var controller))