Ejemplo n.º 1
0
    void SetSkin()
    {
        switch (PlayerPrefs.GetInt("Skin"))
        {
        case 0:

            evilProjectilePrefab.GetComponent <MeshRenderer>().material = materials[0];
            player.GetComponent <MeshRenderer>().material = materials[7];
            Debug.Log("Setting Skin to 0");
            sound.NormalMusic();
            break;

        case 1:

            evilProjectilePrefab.GetComponent <MeshRenderer>().material = materials[1];
            player.GetComponent <MeshRenderer>().material   = materials[3];
            walls[0].GetComponent <MeshRenderer>().material = materials[6];
            walls[1].GetComponent <MeshRenderer>().material = materials[6];
            sound.NormalMusic();
            break;

        case 2:

            evilProjectilePrefab.GetComponent <MeshRenderer>().material = materials[2];
            player.GetComponent <MeshRenderer>().material   = materials[4];
            walls[0].GetComponent <MeshRenderer>().material = materials[5];
            walls[1].GetComponent <MeshRenderer>().material = materials[5];
            sound.InvertMusic();
            break;
        }
    }