Beispiel #1
0
    public void ODOCOQCCOC(Transform tr, ArrayList arr, string[] DOODQOQO, string[] OODDQOQO)
    {
        version    = "2.4.6";
        OODCDOQDCC = (GUISkin)Resources.Load("ER3DSkin", typeof(GUISkin));
        OQOOODODQD = (Texture2D)Resources.Load("ER3DLogo", typeof(Texture2D));
        if (objectStrings == null)
        {
            objectStrings = new string[] { "Road Object", "River Object", "Procedural Mesh Object" };
        }
        this.obj        = tr;
        this.OOQQCODOCD = new OQCDQQDQCC();
        this.OODCCOODCC = this.obj.GetComponent <RoadObjectScript>();
        IEnumerator enumerator = this.obj.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                Transform current = (Transform)enumerator.Current;
                if (current.name == "Markers")
                {
                    this.OODDDCQCOC = current;
                }
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable == null)
            {
            }
            disposable.Dispose();
        }
        OQCDQQDQCC.terrainList.Clear();
        Terrain[] terrainArray = (Terrain[])Object.FindObjectsOfType(typeof(Terrain));
        foreach (Terrain terrain in terrainArray)
        {
            Terrains t = new Terrains {
                terrain = terrain
            };
            if (terrain.gameObject.GetComponent <EasyRoads3DTerrainID>() == null)
            {
                EasyRoads3DTerrainID nid = (EasyRoads3DTerrainID)terrain.gameObject.AddComponent("EasyRoads3DTerrainID");
                string str = Random.Range(0x5f5e100, 0x3b9ac9ff).ToString();
                nid.terrainid = str;
                t.id          = str;
            }
            else
            {
                t.id = terrain.gameObject.GetComponent <EasyRoads3DTerrainID>().terrainid;
            }
            this.OOQQCODOCD.OCDQQCDOQO(t);
        }
        ODCDDDDQQD.OCDQQCDOQO();
        if (this.roadMaterialEdit == null)
        {
            this.roadMaterialEdit = (Material)Resources.Load("materials/roadMaterialEdit", typeof(Material));
        }
        if ((this.objectType == 0) && (GameObject.Find(base.gameObject.name + "/road") == null))
        {
            GameObject obj2 = new GameObject("road")
            {
                transform = { parent = base.transform }
            };
        }
        this.OOQQCODOCD.OODQOQCDCQ(this.obj, OCQCDDDOCC, this.OODCCOODCC.roadWidth, this.surfaceOpacity, out this.OOCCDCOQCQ, out this.indent, this.applyAnimation, this.waveSize, this.waveHeight);
        this.OOQQCODOCD.ODDQCCDCDC       = this.ODDQCCDCDC;
        this.OOQQCODOCD.OOCQDOOCQD       = this.OOCQDOOCQD;
        this.OOQQCODOCD.OdQODQOD         = this.OdQODQOD + 1;
        this.OOQQCODOCD.OOQQQDOD         = this.OOQQQDOD;
        this.OOQQCODOCD.OOQQQDODOffset   = this.OOQQQDODOffset;
        this.OOQQCODOCD.OOQQQDODLength   = this.OOQQQDODLength;
        this.OOQQCODOCD.objectType       = this.objectType;
        this.OOQQCODOCD.snapY            = this.snapY;
        this.OOQQCODOCD.terrainRendered  = this.ODODCOCCDQ;
        this.OOQQCODOCD.handleVegetation = this.handleVegetation;
        this.OOQQCODOCD.raise            = this.raise;
        this.OOQQCODOCD.roadResolution   = this.roadResolution;
        this.OOQQCODOCD.multipleTerrains = this.multipleTerrains;
        this.OOQQCODOCD.editRestore      = this.editRestore;
        this.OOQQCODOCD.roadMaterialEdit = this.roadMaterialEdit;
        if (backupLocation == 0)
        {
            OOCDQCOODC.backupFolder = "/EasyRoads3D";
        }
        else
        {
            OOCDQCOODC.backupFolder = "/Assets/EasyRoads3D/backups";
        }
        this.ODODQOQO    = this.OOQQCODOCD.OCDODCOCOC();
        this.ODODQOQOInt = this.OOQQCODOCD.OCCQOQCQDO();
        if (this.ODODCOCCDQ)
        {
            this.doRestore = true;
        }
        this.OOQODQOCOC();
        if ((arr != null) || (ODODQOOQ == null))
        {
            this.OOOOOOODCD(arr, DOODQOQO, OODDQOQO);
        }
        if (!this.doRestore)
        {
        }
    }
Beispiel #2
0
 public void ODOCOQCCOC(Transform tr, ArrayList arr, string[] DOODQOQO, string[] OODDQOQO)
 {
     RoadObjectScript.version = "2.4.6";
     RoadObjectScript.OODCDOQDCC = (GUISkin)UnityEngine.Resources.Load("ER3DSkin", typeof(GUISkin));
     RoadObjectScript.OQOOODODQD = (Texture2D)UnityEngine.Resources.Load("ER3DLogo", typeof(Texture2D));
     if (RoadObjectScript.objectStrings == null)
     {
         RoadObjectScript.objectStrings = new string[] { "Road Object", "River Object", "Procedural Mesh Object" };
     }
     this.obj = tr;
     this.OOQQCODOCD = new OQCDQQDQCC();
     this.OODCCOODCC = this.obj.GetComponent<RoadObjectScript>();
     IEnumerator enumerator = this.obj.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             Transform current = (Transform)enumerator.Current;
             if (current.name != "Markers")
             {
                 continue;
             }
             this.OODDDCQCOC = current;
         }
     }
     finally
     {
         IDisposable disposable = enumerator as IDisposable;
         if (disposable == null)
         {
         }
         disposable.Dispose();
     }
     OQCDQQDQCC.terrainList.Clear();
     Terrain[] terrainArray = (Terrain[])UnityEngine.Object.FindObjectsOfType(typeof(Terrain));
     for (int i = 0; i < (int)terrainArray.Length; i++)
     {
         Terrain terrain = terrainArray[i];
         Terrains component = new Terrains()
         {
             terrain = terrain
         };
         if (terrain.gameObject.GetComponent<EasyRoads3DTerrainID>())
         {
             component.id = terrain.gameObject.GetComponent<EasyRoads3DTerrainID>().terrainid;
         }
         else
         {
             EasyRoads3DTerrainID easyRoads3DTerrainID = (EasyRoads3DTerrainID)terrain.gameObject.AddComponent("EasyRoads3DTerrainID");
             string str = UnityEngine.Random.Range(100000000, 999999999).ToString();
             easyRoads3DTerrainID.terrainid = str;
             component.id = str;
         }
         this.OOQQCODOCD.OCDQQCDOQO(component);
     }
     ODCDDDDQQD.OCDQQCDOQO();
     if (this.roadMaterialEdit == null)
     {
         this.roadMaterialEdit = (Material)UnityEngine.Resources.Load("materials/roadMaterialEdit", typeof(Material));
     }
     if (this.objectType == 0 && GameObject.Find(string.Concat(base.gameObject.name, "/road")) == null)
     {
         (new GameObject("road")).transform.parent = base.transform;
     }
     this.OOQQCODOCD.OODQOQCDCQ(this.obj, RoadObjectScript.OCQCDDDOCC, this.OODCCOODCC.roadWidth, this.surfaceOpacity, out this.OOCCDCOQCQ, out this.indent, this.applyAnimation, this.waveSize, this.waveHeight);
     this.OOQQCODOCD.ODDQCCDCDC = this.ODDQCCDCDC;
     this.OOQQCODOCD.OOCQDOOCQD = this.OOCQDOOCQD;
     this.OOQQCODOCD.OdQODQOD = this.OdQODQOD + 1;
     this.OOQQCODOCD.OOQQQDOD = this.OOQQQDOD;
     this.OOQQCODOCD.OOQQQDODOffset = this.OOQQQDODOffset;
     this.OOQQCODOCD.OOQQQDODLength = this.OOQQQDODLength;
     this.OOQQCODOCD.objectType = this.objectType;
     this.OOQQCODOCD.snapY = this.snapY;
     this.OOQQCODOCD.terrainRendered = this.ODODCOCCDQ;
     this.OOQQCODOCD.handleVegetation = this.handleVegetation;
     this.OOQQCODOCD.raise = this.raise;
     this.OOQQCODOCD.roadResolution = this.roadResolution;
     this.OOQQCODOCD.multipleTerrains = this.multipleTerrains;
     this.OOQQCODOCD.editRestore = this.editRestore;
     this.OOQQCODOCD.roadMaterialEdit = this.roadMaterialEdit;
     if (RoadObjectScript.backupLocation != 0)
     {
         OOCDQCOODC.backupFolder = "/Assets/EasyRoads3D/backups";
     }
     else
     {
         OOCDQCOODC.backupFolder = "/EasyRoads3D";
     }
     this.ODODQOQO = this.OOQQCODOCD.OCDODCOCOC();
     this.ODODQOQOInt = this.OOQQCODOCD.OCCQOQCQDO();
     if (this.ODODCOCCDQ)
     {
         this.doRestore = true;
     }
     this.OOQODQOCOC();
     if (arr != null || RoadObjectScript.ODODQOOQ == null)
     {
         this.OOOOOOODCD(arr, DOODQOQO, OODDQOQO);
     }
     if (this.doRestore)
     {
         return;
     }
 }
Beispiel #3
0
    public void ODOCOQCCOC(Transform tr, ArrayList arr, string[] DOODQOQO, string[] OODDQOQO)
    {
        RoadObjectScript.version    = "2.4.6";
        RoadObjectScript.OODCDOQDCC = (GUISkin)UnityEngine.Resources.Load("ER3DSkin", typeof(GUISkin));
        RoadObjectScript.OQOOODODQD = (Texture2D)UnityEngine.Resources.Load("ER3DLogo", typeof(Texture2D));
        if (RoadObjectScript.objectStrings == null)
        {
            RoadObjectScript.objectStrings = new string[] { "Road Object", "River Object", "Procedural Mesh Object" };
        }
        this.obj        = tr;
        this.OOQQCODOCD = new OQCDQQDQCC();
        this.OODCCOODCC = this.obj.GetComponent <RoadObjectScript>();
        IEnumerator enumerator = this.obj.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                Transform current = (Transform)enumerator.Current;
                if (current.name != "Markers")
                {
                    continue;
                }
                this.OODDDCQCOC = current;
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable == null)
            {
            }
            disposable.Dispose();
        }
        OQCDQQDQCC.terrainList.Clear();
        Terrain[] terrainArray = (Terrain[])UnityEngine.Object.FindObjectsOfType(typeof(Terrain));
        for (int i = 0; i < (int)terrainArray.Length; i++)
        {
            Terrain  terrain   = terrainArray[i];
            Terrains component = new Terrains()
            {
                terrain = terrain
            };
            if (terrain.gameObject.GetComponent <EasyRoads3DTerrainID>())
            {
                component.id = terrain.gameObject.GetComponent <EasyRoads3DTerrainID>().terrainid;
            }
            else
            {
                EasyRoads3DTerrainID easyRoads3DTerrainID = (EasyRoads3DTerrainID)terrain.gameObject.AddComponent("EasyRoads3DTerrainID");
                string str = UnityEngine.Random.Range(100000000, 999999999).ToString();
                easyRoads3DTerrainID.terrainid = str;
                component.id = str;
            }
            this.OOQQCODOCD.OCDQQCDOQO(component);
        }
        ODCDDDDQQD.OCDQQCDOQO();
        if (this.roadMaterialEdit == null)
        {
            this.roadMaterialEdit = (Material)UnityEngine.Resources.Load("materials/roadMaterialEdit", typeof(Material));
        }
        if (this.objectType == 0 && GameObject.Find(string.Concat(base.gameObject.name, "/road")) == null)
        {
            (new GameObject("road")).transform.parent = base.transform;
        }
        this.OOQQCODOCD.OODQOQCDCQ(this.obj, RoadObjectScript.OCQCDDDOCC, this.OODCCOODCC.roadWidth, this.surfaceOpacity, out this.OOCCDCOQCQ, out this.indent, this.applyAnimation, this.waveSize, this.waveHeight);
        this.OOQQCODOCD.ODDQCCDCDC       = this.ODDQCCDCDC;
        this.OOQQCODOCD.OOCQDOOCQD       = this.OOCQDOOCQD;
        this.OOQQCODOCD.OdQODQOD         = this.OdQODQOD + 1;
        this.OOQQCODOCD.OOQQQDOD         = this.OOQQQDOD;
        this.OOQQCODOCD.OOQQQDODOffset   = this.OOQQQDODOffset;
        this.OOQQCODOCD.OOQQQDODLength   = this.OOQQQDODLength;
        this.OOQQCODOCD.objectType       = this.objectType;
        this.OOQQCODOCD.snapY            = this.snapY;
        this.OOQQCODOCD.terrainRendered  = this.ODODCOCCDQ;
        this.OOQQCODOCD.handleVegetation = this.handleVegetation;
        this.OOQQCODOCD.raise            = this.raise;
        this.OOQQCODOCD.roadResolution   = this.roadResolution;
        this.OOQQCODOCD.multipleTerrains = this.multipleTerrains;
        this.OOQQCODOCD.editRestore      = this.editRestore;
        this.OOQQCODOCD.roadMaterialEdit = this.roadMaterialEdit;
        if (RoadObjectScript.backupLocation != 0)
        {
            OOCDQCOODC.backupFolder = "/Assets/EasyRoads3D/backups";
        }
        else
        {
            OOCDQCOODC.backupFolder = "/EasyRoads3D";
        }
        this.ODODQOQO    = this.OOQQCODOCD.OCDODCOCOC();
        this.ODODQOQOInt = this.OOQQCODOCD.OCCQOQCQDO();
        if (this.ODODCOCCDQ)
        {
            this.doRestore = true;
        }
        this.OOQODQOCOC();
        if (arr != null || RoadObjectScript.ODODQOOQ == null)
        {
            this.OOOOOOODCD(arr, DOODQOQO, OODDQOQO);
        }
        if (this.doRestore)
        {
            return;
        }
    }