Exemplo n.º 1
0
    public void PushInput(InputType type)
    {
        switch (type)
        {
        case InputType.Down:
            push.StartPush();

            if (push.HasTarget)
            {
                lineRenderer.ActivateLine();
                lineRenderer.UpdateLine(transform.position, jointController.GetGrapplePoint());
            }

            break;

        case InputType.Hold:
            push.UpdatePush();

            if (push.HasTarget)
            {
                lineRenderer.UpdateLine(transform.position, jointController.GetGrapplePoint());
            }
            else
            {
                lineRenderer.DeactivateLine();
            }

            break;

        case InputType.Release:
            push.EndPush();
            lineRenderer.DeactivateLine();
            break;
        }
    }