public void OQQDQCDQCQ(Vector3 pos, bool doInsert) { if (!displayRoad) { displayRoad = true; OQDDQQDOOD.OCQOQQOCCQ(displayRoad, ODQOCCDOQQ); } int first = -1; int second = -1; float dist1 = 10000; float dist2 = 10000; Vector3 newpos = pos; OOCDDDDOQQ k; OOCDDDDOQQ k1 = (OOCDDDDOQQ)OQDDQQDOOD.ODQOQOOQOD[0]; OOCDDDDOQQ k2 = (OOCDDDDOQQ)OQDDQQDOOD.ODQOQOOQOD[1]; if (doInsert) { } OQDDQQDOOD.ODDDQDQDCQ(pos, out first, out second, out dist1, out dist2, out k1, out k2, out newpos, doInsert); if (doInsert) { } pos = newpos; if (doInsert && first >= 0 && second >= 0) { if (OQOCCDQQCQ.OOQDOOQQ && second == OQDDQQDOOD.ODQOQOOQOD.Count - 1) { OODDQQCOOQ(pos); } else { k = (OOCDDDDOQQ)OQDDQQDOOD.ODQOQOOQOD[second]; string name = k.object1.name; string n; int j = second + 2; for (int i = second; i < OQDDQQDOOD.ODQOQOOQOD.Count - 1; i++) { k = (OOCDDDDOQQ)OQDDQQDOOD.ODQOQOOQOD[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 = (OOCDDDDOQQ)OQDDQQDOOD.ODQOQOOQOD[first]; Transform newnode = (Transform)Instantiate(k.object1.transform, pos, k.object1.rotation); newnode.gameObject.name = name; newnode.parent = ODQOCCDOQQ; newnode.SetSiblingIndex(second); MarkerScript scr = newnode.GetComponent <MarkerScript>(); scr.OCQQQCOCOD = 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); ODOCDCQOCC(OQOCCDQQCQ.geoResolution, false, false); if (materialType == 0) { OQDDQQDOOD.OOCQQDOODD(materialType); } #if UNITY_3_5 if (objectType == 2) { scr.surface.gameObject.active = false; } #else if (objectType == 2) { scr.surface.gameObject.SetActive(false); } #endif } } OQOQDCCDDD(); }
public void ODOCDCQOCC(float geo, bool renderMode, bool camMode) { OQDDQQDOOD.ODQOQOOQOD.Clear(); int ii = 0; OOCDDDDOQQ 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.OCQQQCOCOD) { markerScript.OCQQQCOCOD = OQDDQQDOOD.ODDCOODQQC(marker); } k = new OOCDDDDOQQ(); k.position = marker.position; k.num = OQDDQQDOOD.ODQOQOOQOD.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.OQCCQDOOCD = markerScript.rs; k.ls = markerScript.ls; if (k.ls < 1) { k.ls = 1f; } k.OCDQOOQQDD = markerScript.ls; k.renderFlag = markerScript.bridgeObject; k.OOCQOQOODD = 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.OCOOQQOQDQ = OQDDQQDOOD; markerScript.markerNum = ii; markerScript.distance = "-1"; markerScript.OCDQDCCQQD = "-1"; OQDDQQDOOD.ODQOQOOQOD.Add(k); ii++; } } } distance = "-1"; OQDDQQDOOD.OCCQOODDDC = OQOCCDQQCQ.roadWidth; OQDDQQDOOD.OCDDDCCDOD(geo, obj, OQOCCDQQCQ.OOQDOOQQ, renderMode, camMode, objectType); if (OQDDQQDOOD.leftVecs.Count > 0) { leftVecs = OQDDQQDOOD.leftVecs.ToArray(); rightVecs = OQDDQQDOOD.rightVecs.ToArray(); } }