private void OnTriggerEnter2D(Collider2D collision) { if (canCollide) { canCollide = false; hookController.OnObjectGrabbed(collision); } }
private void Update() { if (canCollide && !hasHit) { hit = Physics2D.OverlapCircle(hitPosition.transform.position, aimRadius, hookLayer); if (hit != null) { hasHit = true; hookController.OnObjectGrabbed(hit); DOTween.Kill(hookHead.transform); } } if (!canThrow) { SetSpline(); } }