Beispiel #1
0
    void Update()
    {
        Coins.text         = "" + UserDataScript.getCoins();
        BannerImage.sprite = Resources.Load <Sprite>("Banner/" + UserDataScript.getInfo("banner"));
        AvatarImage.sprite = Resources.Load <Sprite>("Avatar/" + UserDataScript.getInfo("avatar"));
        FichaImage.sprite  = Resources.Load <Sprite>("Token/" + UserDataScript.getInfo("ficha"));

        if (!string.IsNullOrEmpty(RepasswordInput.text) & RepasswordInput.text != PasswordInput.text)
        {
            RepasswordImage.enabled = true;
        }
        else
        {
            RepasswordImage.enabled = false;
        }

        if (string.IsNullOrEmpty(PasswordInput.text) | string.IsNullOrEmpty(RepasswordInput.text) |
            RepasswordInput.text != PasswordInput.text)
        {
            ChangePasswordButton.interactable = false;
        }
        else
        {
            ChangePasswordButton.interactable = true;
        }
    }
    void checkActualItem()
    {
        if (UserDataScript.isItem(objectName + index))
        {
            BuyButton.interactable = false;
            BuyButton.GetComponentInChildren <Text>().text  = "EN POSESIÓN";
            BuyButton.GetComponentInChildren <Text>().color = Color.white;

            if (UserDataScript.getInfo(objectName).Equals(objectName + index))
            {
                ActiveButton.interactable = false;
                ActiveButton.GetComponentInChildren <Text>().text = "ACTIVADO";
            }
            else
            {
                ActiveButton.interactable = true;
                ActiveButton.GetComponentInChildren <Text>().text = "ACTIVAR";
            }
        }
        else
        {
            if (UserDataScript.getCoins() < 100)
            {
                BuyButton.interactable = false;
                BuyButton.GetComponentInChildren <Text>().text  = "COMPRAR|100c";
                BuyButton.GetComponentInChildren <Text>().color = Color.red;
            }
            else
            {
                BuyButton.interactable = true;
                BuyButton.GetComponentInChildren <Text>().text  = "COMPRAR|100c";
                BuyButton.GetComponentInChildren <Text>().color = Color.white;
            }

            ActiveButton.interactable = false;
            ActiveButton.GetComponentInChildren <Text>().text = "ACTIVAR";
        }
    }
Beispiel #3
0
 void Update()
 {
     UserAvatar.sprite = Resources.Load <Sprite>("Avatar/" + UserDataScript.getInfo("avatar"));
     Coins.text        = "" + UserDataScript.getCoins();
 }
 void Update()
 {
     playerCoins.text = "" + UserDataScript.getCoins();
 }