Exemple #1
0
        private void Waiting2r()
        {
            Thread.Sleep(20000);
            Mesh      mesh        = LoadAssets.LoadOBJMesh(this, "tire_rally.obj");
            Texture2D mainTexture = LoadAssets.LoadTexture(this, "tires_rally.dds", false);

            GameObject[] array = GameObject.FindObjectsOfType <GameObject>();
            for (int i = 0; i < array.Length; i++)
            {
                GameObject gameObject = array[i];
                if (gameObject.name == "TireRally(Clone)")
                {
                    gameObject.GetComponent <MeshFilter>().mesh = (mesh);
                    gameObject.GetComponent <MeshRenderer>().material.mainTexture = (mainTexture);
                }
            }
            if (GameObject.Find("wheel rally fl(Clone)").activeSelf)
            {
                this.FLRIM = GameObject.Find("wheel rally fl(Clone)");
                this.FRRIM = GameObject.Find("wheel rally fr(Clone)");
                this.RLRIM = GameObject.Find("wheel rally rl(Clone)");
                this.RRRIM = GameObject.Find("wheel rally rr(Clone)");
                Mesh mesh2 = LoadAssets.LoadOBJMesh(this, "rim_rally.obj");
                this.FLRIM.transform.GetComponent <MeshFilter>().mesh = (mesh2);
                this.FRRIM.transform.GetComponent <MeshFilter>().mesh = (mesh2);
                this.RLRIM.transform.GetComponent <MeshFilter>().mesh = (mesh2);
                this.RRRIM.transform.GetComponent <MeshFilter>().mesh = (mesh2);
            }
        }