IEnumerator WaitForUngrapple() { while (grapplingHook.IsGrappling()) { yield return(null); } DisableTutorial(); }
void Update() { if (!grappling.IsGrappling()) { desiredRotation = transform.parent.rotation; } else { desiredRotation = Quaternion.LookRotation(grappling.GetGrapplePoint() - transform.position); } transform.rotation = Quaternion.Lerp(transform.rotation, desiredRotation, Time.deltaTime * rotationSpeed); }
private void AddPoint() { // An extra point is always needed for the current position points++; if (enableLine) { linePoints.Enqueue(transform.position + offset); } current.Add(transform.position + offset, GetComponent <Rigidbody>().velocity, grappleScript.IsGrappling(), grappleScript.GetPos()); }