Ejemplo n.º 1
0
    IEnumerator WaitForUngrapple()
    {
        while (grapplingHook.IsGrappling())
        {
            yield return(null);
        }

        DisableTutorial();
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
    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());
    }