diff --git a/Assets/Prefabs/Cable.prefab b/Assets/Prefabs/Cable.prefab index 8b17fb4..a3d08b1 100755 --- a/Assets/Prefabs/Cable.prefab +++ b/Assets/Prefabs/Cable.prefab @@ -26,7 +26,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2180376356050932351} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.5} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} diff --git a/Assets/Scripts/Cable.cs b/Assets/Scripts/Cable.cs index 51c6d12..79e69c2 100755 --- a/Assets/Scripts/Cable.cs +++ b/Assets/Scripts/Cable.cs @@ -111,13 +111,13 @@ namespace UntitledLogicGame if (Mathf.Abs(endOr.x) > 0) { var middle = (startPos.x + endPos.x) / 2; - _line.SetPosition(1, new Vector3(middle, startPos.y, 0)); - _line.SetPosition(2, new Vector3(middle, endPos.y, 0)); + _line.SetPosition(1, new Vector3(middle, startPos.y, startPos.z)); + _line.SetPosition(2, new Vector3(middle, endPos.y, startPos.z)); } else { - _line.SetPosition(1, new Vector3(startPos.x, endPos.y, 0)); - _line.SetPosition(2, new Vector3(startPos.x, endPos.y, 0)); + _line.SetPosition(1, new Vector3(startPos.x, endPos.y, startPos.z)); + _line.SetPosition(2, new Vector3(startPos.x, endPos.y, startPos.z)); } } else @@ -125,13 +125,13 @@ namespace UntitledLogicGame if (Mathf.Abs(endOr.x) > 0) { var middle = (startPos.y + endPos.y) / 2; - _line.SetPosition(1, new Vector3(startPos.x, middle, 0)); - _line.SetPosition(2, new Vector3(endPos.x, middle, 0)); + _line.SetPosition(1, new Vector3(startPos.x, middle, startPos.z)); + _line.SetPosition(2, new Vector3(endPos.x, middle, startPos.z)); } else { - _line.SetPosition(1, new Vector3(endPos.x, startPos.y, 0)); - _line.SetPosition(2, new Vector3(endPos.x, startPos.y, 0)); + _line.SetPosition(1, new Vector3(endPos.x, startPos.y, startPos.z)); + _line.SetPosition(2, new Vector3(endPos.x, startPos.y, startPos.z)); } } diff --git a/TODO.txt b/TODO.txt index 2bea966..d0c405f 100755 --- a/TODO.txt +++ b/TODO.txt @@ -6,4 +6,5 @@ TODO -(3) generic rect gates -(3) state gates -(5) cable management --(5) buses \ No newline at end of file +-(5) buses +-(?) find a name \ No newline at end of file