public Pavement(Highway highway, myTerrain terrain, pavementSide _side) { Pavementid = highway.id; side = _side; if(side == pavementSide.left) { rightSideVertexes = new List<Vector3>(highway.leftSideVertexes); leftSideVertexes = new List<Vector3>(); generateOtherSide(highway.leftSidewalkSize, terrain); PavementObj = new GameObject("LeftPavement" + Pavementid); PavementObj.transform.parent = highway.highwayGameObject.transform; } if(side == pavementSide.right) { leftSideVertexes = new List<Vector3>(highway.rightSideVertexes); rightSideVertexes = new List<Vector3>(); generateOtherSide(highway.rightSidewalkSize, terrain); PavementObj = new GameObject("RightPavement" + Pavementid); PavementObj.transform.parent = highway.highwayGameObject.transform; } }
public Pavement(Highway highway, myTerrain terrain, pavementSide _side) { Pavementid = highway.id; side = _side; if (side == pavementSide.left) { rightSideVertexes = new List <Vector3>(highway.leftSideVertexes); leftSideVertexes = new List <Vector3>(); generateOtherSide(highway.leftSidewalkSize, terrain); PavementObj = new GameObject("LeftPavement" + Pavementid); PavementObj.transform.parent = highway.highwayGameObject.transform; } if (side == pavementSide.right) { leftSideVertexes = new List <Vector3>(highway.rightSideVertexes); rightSideVertexes = new List <Vector3>(); generateOtherSide(highway.rightSidewalkSize, terrain); PavementObj = new GameObject("RightPavement" + Pavementid); PavementObj.transform.parent = highway.highwayGameObject.transform; } }