Beispiel #1
0
    void SendMsg()
    {
        ComLoading.Open();
        HttpTask task = new HttpTask(ThreadType.MainThread, TaskResponse.Default_Response);

        task.AppendCommonParam(RequestType.GET_COMBO, new GetComboParam(Core.Data.playerManager.PlayerID));

        task.ErrorOccured   = (BaseHttpRequest b, string error) => { ConsoleEx.DebugLog("______Error =" + error.ToString());  ComLoading.Close(); };
        task.afterCompleted = (BaseHttpRequest request, BaseResponse response) =>
        {
            ComLoading.Close();
            if (response.status != BaseResponse.ERROR)
            {
                isFristOpenClient = false;
                ComboResponse resp = response as ComboResponse;

                RTPlayer player = Core.Data.playerManager.RTData;

                player.TotalCombo      = resp.data.combo.total;
                player.TotalGambleWin  = resp.data.gamble.win;
                player.TotalGambleLose = resp.data.gamble.lose;

                UIOptionController.CreatOptionCtrl(DBUIController.mDBUIInstance._TopRoot);
            }
            else
            {
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
            }
        };

        task.DispatchToRealHandler();
    }
Beispiel #2
0
 public void GoToOption()
 {
     if (isFristOpenClient)
     {
         SendMsg();
     }
     else
     {
         UIOptionController.CreatOptionCtrl(DBUIController.mDBUIInstance._TopRoot);
     }
 }