Exemplo n.º 1
0
 /// <summary>
 /// 获取抽奖记录
 /// </summary>
 /// <param name="call"></param>
 public void SendGetPrizeRecord(CallBack <List <RecordInfo> > call)
 {
     NetProcess.SendRequest <int>(0, ProtoIdMap.CMD_sendGetPrizeRecord, (msg) =>
     {
         GetDrawRecord data = msg.Read <GetDrawRecord>();
         if (data.code == 1 && call != null)
         {
             call(data.data.recordInfo);
         }
         else
         {
             Global.Inst.GetController <CommonTipsController>().ShowTips(CodeErrorTips.GetTips(data.code, data.desc));
         }
     });
 }
Exemplo n.º 2
0
    /// <summary>
    /// 抽奖返回
    /// </summary>
    /// <param name="call"></param>
    public void SendPrizeBack(CallBack <DrawBackData> call)
    {
        NetProcess.SendRequest <int>(0, ProtoIdMap.CMD_sendPrizeBack, (msg) =>
        {
            DrawBack data = msg.Read <DrawBack>();

            if (data.code == 1)
            {
                if (call != null)
                {
                    call(data.data);
                }
            }
            else
            {
                Global.Inst.GetController <CommonTipsController>().ShowTips(CodeErrorTips.GetTips(data.code, data.desc));
            }
        });
    }
Exemplo n.º 3
0
 /// <summary>
 /// 显示错误提示
 /// </summary>
 /// <param name="code"></param>
 public static void ShowErrorTips(int code)
 {
     Global.Inst.GetController <CommonTipsController>().ShowTips(CodeErrorTips.GetTips(code));
 }