Пример #1
0
    public BOOSTERDATA GetBoostData(BOOSTERTYPE bType_)
    {
        switch (bType_)
        {
        case BOOSTERTYPE.ScoreMult:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_ScoreMult]);

        case BOOSTERTYPE.GoldMult:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_GoldMult]);

        case BOOSTERTYPE.Shield:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_Shield]);

        case BOOSTERTYPE.SlowerGems:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_SlowerGems]);

        case BOOSTERTYPE.BiggerGems:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_BiggerGems]);

        case BOOSTERTYPE.ScoreMult_Once:
            return(m_uBoostersOnce[0]);

        case BOOSTERTYPE.GoldMult_Once:
            return(m_uBoostersOnce[1]);

        case BOOSTERTYPE.MoreHealth_Once:
            return(m_uBoostersOnce[2]);

        default:
            return(m_uBoosters[0, 0]);
        }
    }
Пример #2
0
    public float GetBoostValue(BOOSTERTYPE bType_)
    {
        switch (bType_)
        {
        case BOOSTERTYPE.ScoreMult:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_ScoreMult].value);

        case BOOSTERTYPE.GoldMult:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_GoldMult].value);

        case BOOSTERTYPE.Shield:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_Shield].value);

        case BOOSTERTYPE.SlowerGems:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_SlowerGems].value);

        case BOOSTERTYPE.BiggerGems:
            return(m_uBoosters[(int)bType_, GameData.Instance.m_Boost_BiggerGems].value);

        default:
            return(1.0f);
        }
    }
Пример #3
0
    public void SetEntry(BOOSTERTYPE type_, BOOSTERDATA tmp_, int cLevel_, bool isOnce_)
    {
        m_Type = type_;
        m_Image.GetComponent <Image>().sprite = BoosterManager.Instance.m_AllImages[(int)m_Type];
        m_Title.GetComponent <Text>().text    = tmp_.title;
        m_Desc.GetComponent <Text>().text     = tmp_.desc;
        m_Cost.GetComponent <Text>().text     = (tmp_.cost != 0) ? tmp_.cost.ToString() : "";
        m_Overlay.SetActive(false);
        m_OverlayText.SetActive(false);
        m_OverlayLock.SetActive(false);
        m_bCost = tmp_.cost;

        if (isOnce_)
        {
            m_Bar.SetActive(false);
            m_BarFrame.SetActive(false);
            m_BarText.SetActive(false);
        }
        else
        {
            m_CurrLevel = cLevel_;
            SetLevelInfo();
        }
    }
Пример #4
0
    public void UpdateEntryBarBoost(BOOSTERTYPE type_, int currLevel_)
    {
        int difference = 0;             // position starts at 5, ID is 5. So, diff is 0.

        m_lViewer[(int)type_ + difference].GetComponent <BoosterEntry>().SetEntry(type_, BoosterManager.Instance.GetBoostData(type_), currLevel_, true);
    }