public void ResetAnimatorTarget(GameObject target) { if (target is null) { throw new ArgumentNullException(nameof(target)); } Animator.ResetTarget(target); SpineController = target.GetComponentInChildren <NPCSpineController>(); if (SpineController is null) { throw new NotFoundComponentException <NPCSpineController>(); } }
public void ResetAnimatorTarget(GameObject target) { if (target is null) { throw new ArgumentNullException(nameof(target)); } Animator.ResetTarget(target); SpineController = target.GetComponentInChildren <NPCSpineController>(); if (SpineController is null) { throw new NotFoundComponentException <NPCSpineController>(); } _touchHandler.SetCollider( SpineController.BoxCollider, target.transform.localPosition, target.transform.localScale); }