public void OCOQDDCCDC(float geo, bool renderMode, bool camMode) { OOCQCQDOQO.OQDQCDDCOC.Clear(); int ii = 0; ODQOQCDQQC k; foreach (Transform child in obj) { if (child.name == "Markers") { foreach (Transform marker in child) { MarkerScript markerScript = marker.GetComponent <MarkerScript>(); markerScript.objectScript = obj.GetComponent <RoadObjectScript>(); if (!markerScript.OCOCQCQODD) { markerScript.OCOCQCQODD = OOCQCQDOQO.OODCCDOQQO(marker); } k = new ODQOQCDQQC(); k.position = marker.position; k.num = OOCQCQDOQO.OQDQCDDCOC.Count; k.object1 = marker; k.object2 = markerScript.surface; k.tension = markerScript.tension; k.ri = markerScript.ri; if (k.ri < 1) { k.ri = 1f; } k.li = markerScript.li; if (k.li < 1) { k.li = 1f; } k.rt = markerScript.rt; k.lt = markerScript.lt; k.rs = markerScript.rs; if (k.rs < 1) { k.rs = 1f; } k.ODQQDQQCDD = markerScript.rs; k.ls = markerScript.ls; if (k.ls < 1) { k.ls = 1f; } k.OCDQCQQQQQ = markerScript.ls; k.renderFlag = markerScript.bridgeObject; k.OODOCQCDQQ = markerScript.distHeights; k.newSegment = markerScript.newSegment; k.tunnelFlag = markerScript.tunnelFlag; k.floorDepth = markerScript.floorDepth; k.waterLevel = waterLevel; k.lockWaterLevel = markerScript.lockWaterLevel; k.sharpCorner = markerScript.sharpCorner; k.ODQOOQQDOQ = OOCQCQDOQO; markerScript.markerNum = ii; markerScript.distance = "-1"; markerScript.OOCOCCDQOQ = "-1"; OOCQCQDOQO.OQDQCDDCOC.Add(k); ii++; } } } distance = "-1"; OOCQCQDOQO.OQODCOCOOO = OQQCCDODCO.roadWidth; OOCQCQDOQO.OOCDQCDQOC(geo, obj, OQQCCDODCO.OOQDOOQQ, renderMode, camMode, objectType); if (OOCQCQDOQO.leftVecs.Count > 0) { leftVecs = OOCQCQDOQO.leftVecs.ToArray(); rightVecs = OOCQCQDOQO.rightVecs.ToArray(); } }
public void OOQOCOCODD(Vector3 pos, bool doInsert) { if (!displayRoad) { displayRoad = true; OOCQCQDOQO.OODQQOCCOO(displayRoad, OCCQODODOD); } int first = -1; int second = -1; float dist1 = 10000; float dist2 = 10000; Vector3 newpos = pos; ODQOQCDQQC k; ODQOQCDQQC k1 = (ODQOQCDQQC)OOCQCQDOQO.OQDQCDDCOC[0]; ODQOQCDQQC k2 = (ODQOQCDQQC)OOCQCQDOQO.OQDQCDDCOC[1]; OOCQCQDOQO.ODQOCDQODQ(pos, out first, out second, out dist1, out dist2, out k1, out k2, out newpos); pos = newpos; if (doInsert && first >= 0 && second >= 0) { if (OQQCCDODCO.OOQDOOQQ && second == OOCQCQDOQO.OQDQCDDCOC.Count - 1) { OQQOODODDC(pos); } else { k = (ODQOQCDQQC)OOCQCQDOQO.OQDQCDDCOC[second]; string name = k.object1.name; string n; int j = second + 2; for (int i = second; i < OOCQCQDOQO.OQDQCDDCOC.Count - 1; i++) { k = (ODQOQCDQQC)OOCQCQDOQO.OQDQCDDCOC[i]; if (j < 10) { n = "Marker000" + j.ToString(); } else if (j < 100) { n = "Marker00" + j.ToString(); } else { n = "Marker0" + j.ToString(); } k.object1.name = n; j++; } k = (ODQOQCDQQC)OOCQCQDOQO.OQDQCDDCOC[first]; Transform newnode = (Transform)Instantiate(k.object1.transform, pos, k.object1.rotation); newnode.gameObject.name = name; newnode.parent = OCCQODODOD; MarkerScript scr = newnode.GetComponent <MarkerScript>(); scr.OCOCQCQODD = false; float totalDist = dist1 + dist2; float perc1 = dist1 / totalDist; float paramDif = k1.ri - k2.ri; scr.ri = k1.ri - (paramDif * perc1); paramDif = k1.li - k2.li; scr.li = k1.li - (paramDif * perc1); paramDif = k1.rt - k2.rt; scr.rt = k1.rt - (paramDif * perc1); paramDif = k1.lt - k2.lt; scr.lt = k1.lt - (paramDif * perc1); paramDif = k1.rs - k2.rs; scr.rs = k1.rs - (paramDif * perc1); paramDif = k1.ls - k2.ls; scr.ls = k1.ls - (paramDif * perc1); OCOQDDCCDC(OQQCCDODCO.geoResolution, false, false); if (materialType == 0) { OOCQCQDOQO.ODCCDODQOO(materialType); } #if UNITY_3_5 if (objectType == 2) { scr.surface.gameObject.active = false; } #else if (objectType == 2) { scr.surface.gameObject.SetActive(false); } #endif } } OOCDCCOCQD(); }
public void OCOQDDCCDC(float geo, bool renderMode, bool camMode) { OOCQCQDOQO.OQDQCDDCOC.Clear(); int ii = 0; ODQOQCDQQC k; foreach(Transform child in obj) { if(child.name == "Markers"){ foreach(Transform marker in child) { MarkerScript markerScript = marker.GetComponent<MarkerScript>(); markerScript.objectScript = obj.GetComponent<RoadObjectScript>(); if(!markerScript.OCOCQCQODD) markerScript.OCOCQCQODD = OOCQCQDOQO.OODCCDOQQO(marker); k = new ODQOQCDQQC(); k.position = marker.position; k.num = OOCQCQDOQO.OQDQCDDCOC.Count; k.object1 = marker; k.object2 = markerScript.surface; k.tension = markerScript.tension; k.ri = markerScript.ri; if(k.ri < 1)k.ri = 1f; k.li =markerScript.li; if(k.li < 1)k.li = 1f; k.rt = markerScript.rt; k.lt = markerScript.lt; k.rs = markerScript.rs; if(k.rs < 1)k.rs = 1f; k.ODQQDQQCDD = markerScript.rs; k.ls = markerScript.ls; if(k.ls < 1)k.ls = 1f; k.OCDQCQQQQQ = markerScript.ls; k.renderFlag = markerScript.bridgeObject; k.OODOCQCDQQ = markerScript.distHeights; k.newSegment = markerScript.newSegment; k.tunnelFlag = markerScript.tunnelFlag; k.floorDepth = markerScript.floorDepth; k.waterLevel = waterLevel; k.lockWaterLevel = markerScript.lockWaterLevel; k.sharpCorner = markerScript.sharpCorner; k.ODQOOQQDOQ = OOCQCQDOQO; markerScript.markerNum = ii; markerScript.distance = "-1"; markerScript.OOCOCCDQOQ = "-1"; OOCQCQDOQO.OQDQCDDCOC.Add(k); ii++; } } } distance = "-1"; OOCQCQDOQO.OQODCOCOOO = OQQCCDODCO.roadWidth; OOCQCQDOQO.OOCDQCDQOC(geo, obj, OQQCCDODCO.OOQDOOQQ, renderMode, camMode, objectType); if(OOCQCQDOQO.leftVecs.Count > 0){ leftVecs = OOCQCQDOQO.leftVecs.ToArray(); rightVecs = OOCQCQDOQO.rightVecs.ToArray(); } }