Exemplo n.º 1
0
 public void ShowGoodsList(SMsgTradeOpenShop_SC sMsgTradeOpenShop_SC, ShopInfoUIManager_V2 MyParent)
 {
     this.sMsgTradeOpenShop_SC = sMsgTradeOpenShop_SC;
     this.MyParent             = MyParent;
     CurrentPageNumber         = 1;
     ResetPageInfo();
 }
Exemplo n.º 2
0
    /// <summary>
    /// 打开商城
    /// </summary>
    /// <param name="dataBuffer"></param>
    /// <param name="sorketID"></param>
    /// <returns></returns>
    CommandCallbackType ReceiveOpenShopHandel(byte[] dataBuffer, int sorketID)
    {
        SMsgTradeOpenShop_SC sMsgTradeOpenShop_SC = SMsgTradeOpenShop_SC.ParsePackage(dataBuffer);

        UIEventManager.Instance.TriggerUIEvent(UIEventType.OpentMainUI, UI.MainUI.UIType.Empty);//清空其他UI界面
        if (UI.MainUI.MainUIController.Instance != null)
        {
            UI.MainUI.MainUIController.Instance.OpenMainUI(UI.MainUI.UIType.Shop, sMsgTradeOpenShop_SC);
        }
        return(CommandCallbackType.Continue);
    }
Exemplo n.º 3
0
 public override void Show(params object[] value)
 {
     this.sMsgTradeOpenShop_SC  = (SMsgTradeOpenShop_SC)value[0];
     this.shopConfigData        = ShopDataManager.Instance.shopConfigDataBase._dataTable.FirstOrDefault(P => P._shopID == this.sMsgTradeOpenShop_SC.dwShopID);
     this.TitleLabel.spriteName = this.shopConfigData._shopName.Split('/')[1];
     this.shopGoodsListPanel.ShowGoodsList(this.sMsgTradeOpenShop_SC, this);
     this.shopSelectGoodsNumberPanel.ClosePanel();
     transform.localPosition = Vector3.zero;
     if (commonUIBottomButtonTool == null)
     {
         commonUIBottomButtonTool = CreatObjectToNGUI.InstantiateObj(UIBottomBtnPrefab, CreatBottomBtnPoint).GetComponent <CommonUIBottomButtonTool>();
         ShowBottomBtn();
     }
     else
     {
         commonUIBottomButtonTool.ShowAnim();
     }
     base.Show(value);
 }
Exemplo n.º 4
0
    public static SMsgTradeOpenShop_SC ParsePackage(byte[] dataBuffer)
    {
        SMsgTradeOpenShop_SC sMsgTradeOpenShop_SC = new SMsgTradeOpenShop_SC();
        int of = 0;

        of += PackageHelper.ReadData(dataBuffer.Skip(of).ToArray(), out sMsgTradeOpenShop_SC.uidNPC);
        of += PackageHelper.ReadData(dataBuffer.Skip(of).ToArray(), out sMsgTradeOpenShop_SC.dwShopID);
        //sMsgTradeOpenShop_SC.szShopName = dataBuffer.Skip(of).Take(32).ToArray();
        //of += 32;
        //sMsgTradeOpenShop_SC.ShopName = Encoding.UTF8.GetString(sMsgTradeOpenShop_SC.szShopName);
        of += PackageHelper.ReadData(dataBuffer.Skip(of).ToArray(), out sMsgTradeOpenShop_SC.bShopGoodsNum);

        SMsgTradeOpenShopGoodsInfo_SC[] GoodsInfoValue = new SMsgTradeOpenShopGoodsInfo_SC[sMsgTradeOpenShop_SC.bShopGoodsNum];
        for (int i = 0; i < GoodsInfoValue.Length; i++)
        {
            GoodsInfoValue[i] = SMsgTradeOpenShopGoodsInfo_SC.ParsePackage(dataBuffer.Skip(of).ToArray());
            of += Marshal.SizeOf(typeof(SMsgTradeOpenShopGoodsInfo_SC));
        }
        sMsgTradeOpenShop_SC.ShopGoodsInfo = GoodsInfoValue;

        return(sMsgTradeOpenShop_SC);
    }