Exemplo n.º 1
0
 private void setStatus()
 {
     wins_me.GetComponent <Text>().text    = PlayerPrefs.GetInt("total_wins", 0) + "";
     money_me.GetComponent <Text>().text   = LanguageSystem.GET_CURRENCY() + PlayerPrefs.GetInt("money", 0);
     rank_me.GetComponent <Image>().sprite = rankList[PlayerPrefs.GetInt("rank", 4)];
     name_me.GetComponent <Text>().text    = PlayerPrefs.GetString("name", LanguageSystem.GET_NAME());
 }
Exemplo n.º 2
0
    public bool configure(StoreItemStruct storeItemStruct)
    {
        init();
        weaponCode = storeItemStruct.weaponCode;
        quality    = storeItemStruct.quality;
        style      = storeItemStruct.style;
        price      = storeItemStruct.price;
        name       = storeItemStruct.name;

        priceText.text  = LanguageSystem.GET_CURRENCY() + price;
        weaponName.text = name;
        frame.color     = arraysData.qualityColors[quality];
        image.sprite    = getImg(weaponCode, style);

        if (haveBought())
        {
            disableButton();
        }

        if (price <= 0)
        {
            Destroy(gameObject);
            return(false);
        }

        return(true);
    }
Exemplo n.º 3
0
 public void setStatus()
 {
     wins.GetComponent <Text>().text    = PlayerPrefs.GetInt("total_wins", 0) + "";
     money.GetComponent <Text>().text   = LanguageSystem.GET_CURRENCY() + PlayerPrefs.GetInt("money", 0);
     rank.GetComponent <Image>().sprite = rankList[PlayerPrefs.GetInt("rank", 4)];
     name.GetComponent <Text>().text    = PlayerPrefs.GetString("name", LanguageSystem.GET_PLAYER_STATUS_NO_NAME_ME());
     pp.GetComponent <Image>().sprite   = arraysData.ppList[PlayerPrefs.GetInt("pp", 2)];
 }
Exemplo n.º 4
0
    private void setStatus()
    {
        wins  = PlayerPrefs.GetInt("total_wins", 0);
        money = PlayerPrefs.GetInt("money", 0);
        rank  = PlayerPrefs.GetInt("rank", 4);
        name  = PlayerPrefs.GetString("name", "Name");
        ppId  = PlayerPrefs.GetInt("pp", 2);

        wins_me.GetComponent <Text>().text    = "" + wins;
        money_me.GetComponent <Text>().text   = LanguageSystem.GET_CURRENCY() + money;
        rank_me.GetComponent <Image>().sprite = rankList[rank];
        name_me.GetComponent <Text>().text    = name;
        pp_me.GetComponent <Image>().sprite   = arraysData.ppList[ppId];
        refreshPlays();
    }
Exemplo n.º 5
0
    public static void addMoney(int extra)
    {
        int money = PlayerPrefs.GetInt("money", 0) + extra;

        PlayerPrefs.SetInt("money", money);
        GameObject[] coinObjects = GameObject.FindGameObjectsWithTag("UI_coin");
        foreach (var coinObject in coinObjects)
        {
            Text txt = coinObject.GetComponent <Text>();
            if (txt != null)
            {
                txt.text = LanguageSystem.GET_CURRENCY() + money;
            }
        }
    }
Exemplo n.º 6
0
 void Start()
 {
     game      = GameObject.Find("MOVABLE").GetComponent <GameScript>();
     money     = GameObject.Find("Money").GetComponent <GameMoney>();
     container = GameObject.Find("SafeArea");
     setButtonsName();
     gameObject.transform.SetParent(container.transform, false);
     zeusPriceText.text  = LanguageSystem.GET_CURRENCY() + zeusPrice;
     flashPriceText.text = LanguageSystem.GET_CURRENCY() + flashPrice;
     kitPriceText.text   = LanguageSystem.GET_CURRENCY() + kitPrice;
     if (game.isT)
     {
         kitButton.SetActive(false);
     }
     checkcanBuyItem();
 }
Exemplo n.º 7
0
 private void refreshUI()
 {
     text.text = LanguageSystem.GET_CURRENCY() + money;
 }