public void UpdateLinePosition(GameObject existingLine, Vector3 startNodePos, Vector3 endNodePos) { existingLine.transform.rotation = pipePrefab.transform.rotation; existingLine.transform.position = startNodePos; LineGeneratorHelper.EndPositionVariables vars = new LineGeneratorHelper.EndPositionVariables( existingLine, startNodePos, endNodePos, pipePrefab.transform.localScale, pipePrefab.GetComponent <SpriteRenderer>().bounds.size.x / 2, 0.0f); existingLine = LineGeneratorHelper.SetEndPosition(vars); //existingLine = SetEndPosition(endNodePos); }
private void CreateNodeEnd(Vector3 endPos, bool runCoroutine = true) { hasCreatedStart = false; endPosition = endPos; if (runCoroutine) { StopCoroutine("CreateLineFromMousePos"); } GameStateManager.Instance.SetInactiveState(); GameStateManager.Instance.SetDragComponentsState(); LineGeneratorHelper.EndPositionVariables vars = new LineGeneratorHelper.EndPositionVariables( line, startPosition, endPosition, originalScale, originalWidth, oldZAngle); line = LineGeneratorHelper.SetEndPosition(vars); if (TutorialManager.Instance != null) { TutorialManager.Instance.CheckEvent(localEventID); } //SetEndPosition(endPos); CreateSymbol(); }