Пример #1
0
    // Use this for initialization
    void Start()
    {
        current = this;

        // GetComponent<Renderer>().material.shader = Shader.Find("Unlit/Texture");

        if (PlayerPrefs.GetInt("WorldShown", 1) == 1)
        {
            GetComponent <Renderer>().material.mainTexture = textures[0];
        }
        if (PlayerPrefs.GetInt("WorldShown", 1) == 2)
        {
            GetComponent <Renderer>().material.mainTexture = textures[1];
        }
        if (PlayerPrefs.GetInt("WorldShown", 1) == 3)
        {
            GetComponent <Renderer>().material.mainTexture = textures[2];
        }
        if (PlayerPrefs.GetInt("WorldShown", 1) == 4)
        {
            GetComponent <Renderer>().material.mainTexture = textures[3];
        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     current = this;
 }