Beispiel #1
0
    public void OQODDQOODQ(Vector3 pos, bool doInsert)
    {
        if (!displayRoad)
        {
            displayRoad = true;
            OOOOODODCQ.OOQCQOCOOC(displayRoad, OCCOCOOOCC);
        }

        int        first  = -1;
        int        second = -1;
        float      dist1  = 10000;
        float      dist2  = 10000;
        Vector3    newpos = pos;
        ODQOOCQDQD k;
        ODQOOCQDQD k1 = (ODQOOCQDQD)OOOOODODCQ.OCDQDDDDCO[0];
        ODQOOCQDQD k2 = (ODQOOCQDQD)OOOOODODCQ.OCDQDDDDCO[1];

        if (doInsert)
        {
        }
        OOOOODODCQ.OOOCDCDQDD(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 (OQOCQODQCO.OOQDOOQQ && second == OOOOODODCQ.OCDQDDDDCO.Count - 1)
            {
                OQDCOOOOQC(pos);
            }
            else
            {
                k = (ODQOOCQDQD)OOOOODODCQ.OCDQDDDDCO[second];
                string name = k.object1.name;
                string n;
                int    j = second + 2;
                for (int i = second; i < OOOOODODCQ.OCDQDDDDCO.Count - 1; i++)
                {
                    k = (ODQOOCQDQD)OOOOODODCQ.OCDQDDDDCO[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 = (ODQOOCQDQD)OOOOODODCQ.OCDQDDDDCO[first];
                Transform newnode = (Transform)Instantiate(k.object1.transform, pos, k.object1.rotation);
                newnode.gameObject.name = name;
                newnode.parent          = OCCOCOOOCC;
                newnode.SetSiblingIndex(second);
                MarkerScript scr = newnode.GetComponent <MarkerScript>();
                scr.OCDQCOOOOC = 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);
                ODQCCQDQQC(OQOCQODQCO.geoResolution, false, false);
                if (materialType == 0)
                {
                    OOOOODODCQ.OCCDCCQDCQ(materialType);
                }
#if UNITY_3_5
                if (objectType == 2)
                {
                    scr.surface.gameObject.active = false;
                }
#else
                if (objectType == 2)
                {
                    scr.surface.gameObject.SetActive(false);
                }
#endif
            }
        }
        OQOQQQCDOQ();
    }
Beispiel #2
0
    public void ODQCCQDQQC(float geo, bool renderMode, bool camMode)
    {
        OOOOODODCQ.OCDQDDDDCO.Clear();
        int        ii = 0;
        ODQOOCQDQD 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.OCDQCOOOOC)
                    {
                        markerScript.OCDQCOOOOC = OOOOODODCQ.OCODDOQQDO(marker);
                    }
                    k          = new ODQOOCQDQD();
                    k.position = marker.position;
                    k.num      = OOOOODODCQ.OCDQDDDDCO.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.OQQQOOOQQQ = markerScript.rs;
                    k.ls         = markerScript.ls;
                    if (k.ls < 1)
                    {
                        k.ls = 1f;
                    }
                    k.OQDDOOQCOC            = markerScript.ls;
                    k.renderFlag            = markerScript.bridgeObject;
                    k.OOQOCDCQDD            = 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.OQCQOCOOQD            = OOOOODODCQ;
                    markerScript.markerNum  = ii;
                    markerScript.distance   = "-1";
                    markerScript.OCOQOQCDCD = "-1";
                    OOOOODODCQ.OCDQDDDDCO.Add(k);
                    ii++;
                }
            }
        }
        distance = "-1";

        OOOOODODCQ.OOOQDCCOCD = OQOCQODQCO.roadWidth;

        OOOOODODCQ.OOOOQCCQOO(geo, obj, OQOCQODQCO.OOQDOOQQ, renderMode, camMode, objectType);
        if (OOOOODODCQ.leftVecs.Count > 0)
        {
            leftVecs  = OOOOODODCQ.leftVecs.ToArray();
            rightVecs = OOOOODODCQ.rightVecs.ToArray();
        }
    }