Пример #1
0
        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>();
            }
        }
Пример #2
0
        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);
        }