private void GrabbedHook() { isDone = true; if (nodeCount == 0) { CreateNode(); } AttachRope(); /*while (Vector2.Distance(player.transform.position, lastNode.transform.position) > PM.ropeDistance) * { * CreateNode(); * }*/ /* NodeScript nodeScript = lastNode.GetComponent<NodeScript>(); * * if (nodeScript != null) * { * nodeScript.SetNewLineTarget(player.transform); * }*/ PM.SetNewHook(gameObject); if (!particlesDone) { particlesDone = true; EM.CreateGrabberFriendlyEffect(attachedHook.transform.position); } if (targetGrabber != null) { targetGrabber.TurnFriendly(); } PM.ResetAirJump(); //aux.CreateSmallFriendlyCircle(attachedHook.transform.position); GameObject node = nodePool.GetPooledObject(); node.transform.position = player.transform.position; node.transform.rotation = Quaternion.identity; node.transform.SetParent(transform); node.SetActive(true); NodeScript nodeScript = lastNode.GetComponent <NodeScript>(); if (nodeScript != null) { nodeScript.SetNewLineTarget(player.transform); } //PM.SetNewLineTarget(lastNode.transform); //transform.DetachChildren(); }