示例#1
0
    public void PrepareText(ShopItem item)
    {
        TextMeshProUGUI textMeshPro = item.GetComponentInChildren <TextMeshProUGUI>();

        item.GetComponentInChildren <LocalizationUnit>().SetText();

        if (item.videoAgainstMoney)
        {
            textMeshPro.text = textMeshPro.text.Replace("$price$", LocalizationManager.instance.GetRewarded());
        }
        else
        {
            textMeshPro.text = textMeshPro.text.Replace("$price$", item.price.ToString());
        }
        textMeshPro.text = textMeshPro.text.Replace("$value$", item.value.ToString());
    }