private void WeaponCollider() { if (_colliderRoutine != null) { StopCoroutine(_colliderRoutine); GetAttackCollider.SetReset(); } _colliderRoutine = StartCoroutine(WeaponColliderPositioning()); }
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(); }