Пример #1
0
        public void ShowGoodsInfo(uint ItemID, tagFishRechargeInfo payInfo, PayType type)
        {
            m_Paytype         = type;
            m_ItemID          = ItemID;
            m_ItemIcon.sprite = ResManager.Instance.LoadSprite("BuYu/Texture/GoodsIcon/" + payInfo.Icon);
            m_ItemName.text   = payInfo.Name;
            if (type == PayType.ITEM)
            {
            }
            else if (type == PayType.Gold)
            {
            }

            m_DesItemSum.text     = payInfo.AddMoney.ToString();
            m_DisCountIcon.sprite = ResManager.Instance.LoadSprite("Lobby/Achieve/" + payInfo.sDisCountPicName);

            //不打折扣
            if (payInfo.dDisCountPrice == payInfo.dPreDisCountPrice)
            {
                m_ItemOldPrice.text = payInfo.dDisCountPrice.ToString();
                m_ItemCurPrice.text = payInfo.dDisCountPrice.ToString();
                m_ItemCurPrice.gameObject.SetActive(false);
                m_OverLine.gameObject.SetActive(false);
            }
            else
            {
                m_ItemOldPrice.text = payInfo.dPreDisCountPrice.ToString();
                m_ItemCurPrice.text = payInfo.dDisCountPrice.ToString();
                m_OverLine.gameObject.SetActive(true);
            }
        }
Пример #2
0
 public void ShowGoodsInfo(uint ItemID, tagFishRechargeInfo payInfo, PayType type)
 {
     m_Paytype             = type;
     m_ItemID              = ItemID;
     m_ProductID           = payInfo.ProductID;
     m_ItemIcon.spriteName = payInfo.Icon;
     m_ItemName.text       = payInfo.Name;
     if (type == PayType.Gold)
     {
         m_DesItemIcon.spriteName = "HallBtn_Gold";
         //m_ItemPriceIcon.spriteName = "rmb_logo";
     }
     else
     {
         m_DesItemIcon.spriteName = "HallBtn_Diamond";
         //m_ItemPriceIcon.spriteName = "rmb_logo";
     }
     m_DesItemSum.text         = Utility.NumToThousand(payInfo.AddMoney);
     m_DisCountIcon.spriteName = payInfo.sDisCountPicName;
     //不打折扣
     if (payInfo.dDisCountPrice == payInfo.dPreDisCountPrice)
     {
         //m_ItemOldPrice.text = payInfo.dDisCountPrice.ToString();
         m_ItemCurPrice.text = Utility.NumToString(payInfo.dDisCountPrice);
         //m_ItemCurPrice.gameObject.SetActive(false);
         //m_OverLine.SetActive(false);
     }
     else
     {
         //m_ItemOldPrice.text = payInfo.dPreDisCountPrice.ToString();
         m_ItemCurPrice.text = payInfo.dDisCountPrice.ToString();
         //m_OverLine.SetActive(true);
     }
 }
Пример #3
0
    bool HandleGetShopList(NetCmdBase obj)
    {
        GC_Cmd_GetShopList ncb = (GC_Cmd_GetShopList)obj;

        if (ncb != null && ncb.config != null)
        {
            if ((ncb.states & FishDataInfo.MsgBegin) != 0)
            {
                FishConfig.Instance.m_FishRecharge.m_FishRechargeMap.Clear();
            }

            for (int i = 0; i < ncb.sum; ++i)
            {
                string itemName            = "";
                tagFishRechargeInfo config = ncb.config[i];

                byte[] data = Encoding.ASCII.GetBytes(config.Name);
                itemName = UTF8Encoding.UTF8.GetString(data);
                UnityEngine.Debug.Log("config " + config.Name + "  " + itemName);
                FishConfig.Instance.m_FishRecharge.m_FishRechargeMap.Add(config.ID, config);
            }
            if ((ncb.states & FishDataInfo.MsgEnd) != 0)
            {
                FishConfig.Instance.m_FishRecharge.m_IsServerShopList = true;
                tagGetShopListEvent pEvent = new tagGetShopListEvent();
                MsgEventHandle.HandleMsg(pEvent);
            }
        }
        return(true);
    }