示例#1
0
 // Trigger fires when the player collides with a hook,
 // to destroy the correct hook if it was retracting
 void Trigger(Collider2D collider)
 {
     if (collider.gameObject == grapplingHook1 && grapple1.Retracting())
     {
         collider.gameObject.SetActive(false);
     }
     else if (collider.gameObject == grapplingHook2 && grapple2.Retracting())
     {
         collider.gameObject.SetActive(false);
     }
 }