public void Purchase() { purchaseManager.BuyCharacter(selectedCharacter - 1); if (PlayerPrefs.GetInt("Character" + selectedCharacter.ToString(), 0) == -1) { ApplyBtn.gameObject.SetActive(true); BuyBtn.SetActive(false); ApplyBtn.text = language_Manager.GetTextByValue("SelectTxt"); dialogOk.InvokeDialog(language_Manager.GetTextByValue("ThanksForPurchase")); } }