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()); }
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); }
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)]; }
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(); }
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; } } }
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(); }
private void refreshUI() { text.text = LanguageSystem.GET_CURRENCY() + money; }