Ejemplo n.º 1
0
    public void AtivaTudo()
    {
        skinModels[PlayerPrefsManager.Instance.prefsVariables.skinIndex].ChangeCustom(true);
        skin2Models[PlayerPrefsManager.Instance.prefsVariables.skinIndex].ChangeCustom(true);
        hairModels[PlayerPrefsManager.Instance.prefsVariables.hairIndex].ChangeCustom(true);
        hair2Models[PlayerPrefsManager.Instance.prefsVariables.hairIndex].ChangeCustom(true);
        shirtModels[PlayerPrefsManager.Instance.prefsVariables.shirtIndex].ChangeCustom(true);
        shirt2Models[PlayerPrefsManager.Instance.prefsVariables.shirtIndex].ChangeCustom(true);
        legModels[PlayerPrefsManager.Instance.prefsVariables.legsIndex].ChangeCustom(true);
        leg2Models[PlayerPrefsManager.Instance.prefsVariables.legsIndex].ChangeCustom(true);
        shoeModels[PlayerPrefsManager.Instance.prefsVariables.shoeIndex].ChangeCustom(true);
        shoe2Models[PlayerPrefsManager.Instance.prefsVariables.shoeIndex].ChangeCustom(true);
        oculosModels[PlayerPrefsManager.Instance.prefsVariables.oculosIndex].ChangeCustom(true);
        oculos2Models[PlayerPrefsManager.Instance.prefsVariables.oculosIndex].ChangeCustom(true);
        maskModels[PlayerPrefsManager.Instance.prefsVariables.maskIndex].ChangeCustom(true);
        mask2Models[PlayerPrefsManager.Instance.prefsVariables.maskIndex].ChangeCustom(true);
        boneModels[PlayerPrefsManager.Instance.prefsVariables.boneIndex].ChangeCustom(true);
        bone2Models[PlayerPrefsManager.Instance.prefsVariables.boneIndex].ChangeCustom(true);
        pupilaModels[PlayerPrefsManager.Instance.prefsVariables.sombrancelhaIndex].ChangeCustom(true);
        pupila2Models[PlayerPrefsManager.Instance.prefsVariables.sombrancelhaIndex].ChangeCustom(true);
        sobrancelhaModels[PlayerPrefsManager.Instance.prefsVariables.sombrancelhaIndex].ChangeCustom(true);
        sobrancelha2EsqModels[PlayerPrefsManager.Instance.prefsVariables.sombrancelhaIndex].ChangeCustom(true);
        sobrancelha2DirModels[PlayerPrefsManager.Instance.prefsVariables.sombrancelhaIndex].ChangeCustom(true);

        customController = GetComponent <CustomController>();
        customController.TiraCustomDesativada();

        Debug.Log("[CustomDisplay] AtivaTudo()");
    }
Ejemplo n.º 2
0
    public void AtivaRoupas()
    {
        pv = GetComponent <PhotonView>();
        customController = GetComponent <CustomController>();

        PlayerPrefsManager.Instance.LoadPlayerPref("Customização");

        PhotonNetwork.LocalPlayer.CustomProperties["hairIndex"]        = PlayerPrefsManager.Instance.prefsVariables.hairIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["shirtIndex"]       = PlayerPrefsManager.Instance.prefsVariables.shirtIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["legsIndex"]        = PlayerPrefsManager.Instance.prefsVariables.legsIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["shoeIndex"]        = PlayerPrefsManager.Instance.prefsVariables.shoeIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["oculosIndex"]      = PlayerPrefsManager.Instance.prefsVariables.oculosIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["ciliosIndex"]      = PlayerPrefsManager.Instance.prefsVariables.ciliosIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["maskIndex"]        = PlayerPrefsManager.Instance.prefsVariables.maskIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["boneIndex"]        = PlayerPrefsManager.Instance.prefsVariables.boneIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["skinIndex"]        = PlayerPrefsManager.Instance.prefsVariables.skinIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["pupilaIndex"]      = PlayerPrefsManager.Instance.prefsVariables.pupilaIndex;
        PhotonNetwork.LocalPlayer.CustomProperties["sobrancelhaIndex"] = PlayerPrefsManager.Instance.prefsVariables.sombrancelhaIndex;


        //hair.prop2DInd = 1;//utilizei pra resetar os valores do cabelo
        if (GameManager.inRoom == false)
        {
            TrocaOffline();
        }

        else
        {
            if (pv.IsMine)
            {
                TrocaOffline();
            }

            else
            {
                TrocaOtherPv();
            }
        }

        customController.TiraCustomDesativada();
    }
Ejemplo n.º 3
0
    public void DesativaTudo()
    {
        for (int i = 0; i < skinModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.skinIndex)
            {
                skinModels[i].ChangeCustom(false);
                skin2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < hairModels.Length; i++)
        {
            hairModels[i].ChangeCustom(false);
            hair2Models[i].ChangeCustom(false);
        }

        hairModels[PlayerPrefsManager.Instance.prefsVariables.hairIndex].ChangeCustom(true);
        hair2Models[PlayerPrefsManager.Instance.prefsVariables.hairIndex].ChangeCustom(true);

        for (int i = 0; i < shirtModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.shirtIndex)
            {
                shirtModels[i].ChangeCustom(false);
                shirt2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < legModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.legsIndex)
            {
                legModels[i].ChangeCustom(false);
                leg2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < shoeModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.shoeIndex)
            {
                shoeModels[i].ChangeCustom(false);
                shoe2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < oculosModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.oculosIndex)
            {
                oculosModels[i].ChangeCustom(false);
                oculos2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < ciliosModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.ciliosIndex)
            {
                ciliosModels[i].ChangeCustom(false);
                cilios2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < maskModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.maskIndex)
            {
                maskModels[i].ChangeCustom(false);
                mask2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < boneModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.boneIndex)
            {
                boneModels[i].ChangeCustom(false);
                bone2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < pupilaModels.Length; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.pupilaIndex)
            {
                pupilaModels[i].ChangeCustom(false);
                pupila2Models[i].ChangeCustom(false);
            }
        }

        for (int i = 0; i < 3; i++)
        {
            if (i != PlayerPrefsManager.Instance.prefsVariables.sombrancelhaIndex)
            {
                sobrancelhaModels[i].ChangeCustom(false);
                sobrancelha2EsqModels[i].ChangeCustom(false);
                sobrancelha2DirModels[i].ChangeCustom(false);
            }
        }

        if (customController == null)
        {
            customController = GetComponent <CustomController>();
        }

        customController.TiraCustomDesativada();
        Debug.Log("[CustomDisplay] DesativaTudo()");
        //AtivaTudo();
    }