public void Input(Vector3[] path, List <IndexedRaycastHit> hitData) { var result = cutoffPath.Input(ref path, hitData); OutputPath.Invoke(path); OutputEndpoint.Invoke(result.cutoffPoint); OutputResult.Invoke(result.success); }
void Update() { axisInput = XRStatics.Get2DAxisValue(controller.inputDevice); inputActive = binaryThreshold.Input(axisInput); lineRenderer.enabled = inputActive; if (inputActive != priorInputActive) { endMarker.SetVisible(inputActive); } if (teleportCondition) { rig.transform.position = destination; OnSuccess.Invoke(destination); if (landMessage) { var response = result.surface.GetComponent <RespondToMessage>(); if (response) { response.Message(landMessage); } } } priorInputActive = inputActive; if (!inputActive) { return; } transform.eulerAngles = forward; arcPoints = parabolicArc.Calculate(angle); hitsInPath = findHitsInPath.Input(arcPoints); result = calculateCutoff.Input(ref arcPoints, hitsInPath); line.SetPositionsAndCount(arcPoints); color = GetColorFromResult(result.success); line.SetMaterialColor(color); endMarker.transform.position = result.cutoffPoint; endMarker.SetVisible(result.success == Trinary.True); endMarker.SetColor(color); }