Ejemplo n.º 1
0
        private void WeaponCollider()
        {
            if (_colliderRoutine != null)
            {
                StopCoroutine(_colliderRoutine);
                GetAttackCollider.SetReset();
            }

            _colliderRoutine = StartCoroutine(WeaponColliderPositioning());
        }
Ejemplo n.º 2
0
        private IEnumerator WeaponColliderPositioning()
        {
            _triggerActive = true;

            GetAttackCollider.SetCollider(_transform, GetCurrentRightWeapon.GetHandle, GetCurrentRightWeapon.GetPike);

            GetAttackCollider.GetBoxCollider.enabled = true;

            while (_triggerActive)
            {
                GetAttackCollider.SetCollider(_transform, GetCurrentRightWeapon.GetHandle, GetCurrentRightWeapon.GetPike);

                yield return(null);
            }

            yield return(null);

            GetAttackCollider.SetReset();
        }