示例#1
0
    //---------------------------------------------------------------------------
    public void Init(int rank_s, int rank_e, int gem, int pvp, pe_GoodsType token_type, bool selected)
    {
        if (rank_e <= 3 && rank_e > 0)
        {
            m_SpriteRank.spriteName = string.Format("arena_ranking_{0}", rank_e);
            m_labelRank.gameObject.SetActive(false);
            m_SpriteRank.gameObject.SetActive(true);
        }
        else
        {
            if (rank_e < 0)
            {
                m_labelRank.text = Localization.Format("PVPRewardRank", rank_s, "");
            }
            else
            {
                m_labelRank.text = Localization.Format("PVPRewardRank", rank_s, rank_e);
            }

            m_labelRank.gameObject.SetActive(true);
            m_SpriteRank.gameObject.SetActive(false);
        }
        //Debug.LogFormat("{0}, {1}",gem, pvp);
        m_labelTokenGem.text = "x" + Localization.Format("GoodsFormat", gem);
        m_labelTokenPvp.text = "x" + Localization.Format("GoodsFormat", pvp);

        m_SpriteGem.SetActive(gem > 0);
        m_SpritePvp.SetActive(pvp > 0);
        m_SpriteToken.spriteName = token_type.ToString();
        m_BG.SetSpriteActive(selected);
    }
示例#2
0
    void UpdateMileage()
    {
        pe_GoodsType type = pe_GoodsType.token_mileage;

        switch (CurrentStoreInfo.ID)
        {
        case "Boss":
            type = pe_GoodsType.token_boss;
            break;

        case "Arena":
            type = pe_GoodsType.token_arena;
            break;

        case "Energy":
            type = pe_GoodsType.token_friends;
            break;
        }
        m_SpriteMileage.spriteName = type.ToString();
        m_LabelMileage.text        = Localization.Format("GoodsFormat", Network.PlayerInfo.GetGoodsValue(type));
    }