Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (canCollide)
     {
         canCollide = false;
         hookController.OnObjectGrabbed(collision);
     }
 }
Exemple #2
0
 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();
     }
 }