예제 #1
0
    //=============================================================================

    public void ShowPanel(bool bActive, int FairyLevel = 1, eFairy Fairy = eFairy.BLOOM)
    {
        if (bActive)
        {
            m_bButtonPressed = false;
            m_MainPanel.SetActive(true);

            FairyItemData CurFairyInfo = FairyItemsManager.GetFairyItem(Fairy);
            m_RequirementsPanel.Setup(CurFairyInfo, FairyLevel);

            m_txtFairyLevel.text = FairyLevel.ToString();

            string txtHeader = TextManager.GetText("BOUTIQUE_UPGRADEFAIRY_TITLE");
            txtHeader        = txtHeader.Replace("(FairyName)", Fairy.ToString().ToUpper());
            m_txtHeader.text = txtHeader;

            string txtLevelUp = TextManager.GetText("BOUTIQUE_UPGRADEFAIRY_LEVELUP");
            txtLevelUp        = txtLevelUp.Replace("(Cost)", String.Format("{0:n0}", CurFairyInfo.GemsRequired[FairyLevel]));
            m_txtLevelUp.text = txtLevelUp;
        }
        else
        {
            m_MainPanel.SetActive(false);
        }
    }
예제 #2
0
    //=============================================================================

    public void ShowPanel(bool bActive, bool bIsOutfit = false, eFairy Fairy = eFairy.BLOOM, int Cost = 0)
    {
        if (bActive)
        {
            m_bButtonPressed = false;
            m_MainPanel.SetActive(true);

            if (bIsOutfit)
            {
                m_txtHeader.text = TextManager.GetText("BOUTIQUE_PURCHASE_TITLE_OUTFIT");
                m_txtDesc.text   = TextManager.GetText("BOUTIQUE_PURCHASE_DESC_OUTFIT");

                m_sprPurchaseOverlayGems.SetActive(false);
                m_sprPurchaseOverlayDiamonds.SetActive(true);
            }
            else
            {
                string txtHeader = TextManager.GetText("BOUTIQUE_PURCHASE_TITLE_FAIRY");
                txtHeader        = txtHeader.Replace("(FairyName)", Fairy.ToString().ToUpper());
                m_txtHeader.text = txtHeader;

                string txtDesc = TextManager.GetText("BOUTIQUE_PURCHASE_DESC_FAIRY");
                txtDesc        = txtDesc.Replace("(FairyName)", Fairy.ToString());
                m_txtDesc.text = txtDesc;

                m_sprPurchaseOverlayGems.SetActive(true);
                m_sprPurchaseOverlayDiamonds.SetActive(false);
            }

            string txtCost = TextManager.GetText("BOUTIQUE_PURCHASE");
            txtCost                = txtCost.Replace("(Cost)", String.Format("{0:n0}", Cost));
            m_txtCostGems.text     = txtCost;
            m_txtCostDiamonds.text = txtCost;
        }
        else
        {
            m_MainPanel.SetActive(false);
        }
    }