Ejemplo n.º 1
0
		public void onConnectDone(ConnectEvent eventObj) {
			Log("connecting server result: " + (eventObj.getResult()== 0) + "(" + eventObj.getResult() + ")");

			if (eventObj.getResult() == 0) {
				WarpClient.GetInstance().SubscribeRoom(roomid);
			}
		}
 public void onConnectDone(ConnectEvent eventObj)
 {
     status = "onConnectDone.."+eventObj.getResult ();
     if (eventObj.getResult () == WarpResponseResultCode.SUCCESS) {
         WarpClient.GetInstance ().initUDP ();
         WarpClient.GetInstance ().JoinRoomInRange (1, 1, true);
     }
 }
Ejemplo n.º 3
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     Log ("onConnectDone : " + eventObj.getResult());
     if(eventObj.getResult() == 0)
     {
         WarpClient.GetInstance().SubscribeRoom(appwarp.roomid);
     }
 }
Ejemplo n.º 4
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            Log("connecting server result: " + (eventObj.getResult() == 0) + "(" + eventObj.getResult() + ")");

            if (eventObj.getResult() == 0)
            {
                WarpClient.GetInstance().SubscribeRoom(roomid);
            }
        }
Ejemplo n.º 5
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     Console.WriteLine("onConnectDone as " + eventObj.getResult());
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Console.WriteLine("Joining Room " + Constants.CHAT_ROOM_ID);
         WarpClient.GetInstance().JoinRoom(Constants.CHAT_ROOM_ID);
     }
 }
Ejemplo n.º 6
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     Console.WriteLine("onConnectDone as "+eventObj.getResult());
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Console.WriteLine("Joining Room "+Constants.CHAT_ROOM_ID);
         WarpClient.GetInstance().JoinRoom(Constants.CHAT_ROOM_ID);
     }
 }
 public void onConnectDone(ConnectEvent eventObj)
 {
     status = "onConnectDone.." + eventObj.getResult();
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         WarpClient.GetInstance().initUDP();
         WarpClient.GetInstance().JoinRoomInRange(1, 1, true);
     }
 }
Ejemplo n.º 8
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            // instead of all the else statements
            Global.connectSuccess = false;
            /*-----------------------     SUCCESS IN CONNECTING     -----------------------*/
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                Global.connectSuccess = true;
                attempts = 0;
                System.Diagnostics.Debug.WriteLine("conn successful");
                _page.timeout = 0;  
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("Connection Successful :)");
                });
                Global.warpClient.JoinRoomWithProperties(new Dictionary<string, object>() { { "category", Global.itemName[(int)settings["trigger"]] }, { "availUsers", 1 } });
                System.Diagnostics.Debug.WriteLine("trying to join room");
            }
            /*-----------------------     RECOVERABLE CONNECTION ERROR     -----------------------*/
            else if (eventObj.getResult() == WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE)
            {
                Global.warpClient.RecoverConnection();

                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("recoverable connection error");

                });
                System.Diagnostics.Debug.WriteLine("fail scenes");
            }
            /*-----------------------     RECOVERY SUCCESS     -----------------------*/
            else if (eventObj.getResult() == WarpResponseResultCode.SUCCESS_RECOVERED)
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("connection error recovered");

                });
                System.Diagnostics.Debug.WriteLine("fail scenes");
            }
            /*-----------------------     CONNECTION FAILED      -----------------------*/
            else if(eventObj.getResult() == WarpResponseResultCode.CONNECTION_ERR)
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("connection error");

                });
                System.Diagnostics.Debug.WriteLine("fail scenes");
                if(attempts<2)
                {
                    Global.warpClient.Connect(Global.localUsername);
                }
                attempts++;
                
            }
        }
Ejemplo n.º 9
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            // instead of all the else statements
            Global.connectSuccess = false;
            /*-----------------------     SUCCESS IN CONNECTING     -----------------------*/
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                Global.connectSuccess = true;
                attempts = 0;
                System.Diagnostics.Debug.WriteLine("conn successful");
                _page.timeout = 0;
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("Connection Successful :)");
                });
                Global.warpClient.JoinRoomWithProperties(new Dictionary <string, object>()
                {
                    { "category", Global.itemName[(int)settings["trigger"]] }, { "availUsers", 1 }
                });
                System.Diagnostics.Debug.WriteLine("trying to join room");
            }
            /*-----------------------     RECOVERABLE CONNECTION ERROR     -----------------------*/
            else if (eventObj.getResult() == WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE)
            {
                Global.warpClient.RecoverConnection();

                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("recoverable connection error");
                });
                System.Diagnostics.Debug.WriteLine("fail scenes");
            }
            /*-----------------------     RECOVERY SUCCESS     -----------------------*/
            else if (eventObj.getResult() == WarpResponseResultCode.SUCCESS_RECOVERED)
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("connection error recovered");
                });
                System.Diagnostics.Debug.WriteLine("fail scenes");
            }
            /*-----------------------     CONNECTION FAILED      -----------------------*/
            else if (eventObj.getResult() == WarpResponseResultCode.CONNECTION_ERR)
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("connection error");
                });
                System.Diagnostics.Debug.WriteLine("fail scenes");
                if (attempts < 2)
                {
                    Global.warpClient.Connect(Global.localUsername);
                }
                attempts++;
            }
        }
Ejemplo n.º 10
0
        //ConnectionRequestListener
        public void onConnectDone(ConnectEvent eventObj)
        {
            Debug.Log("onConnectDone >> " + eventObj.getResult());
            DEBUG.Log("ConnectDone >> " + eventObj.getResult());
            //DEBUG.Log ("onConnectDone "+eventObj.getResult());
//			GameObject camera = GameObject.FindGameObjectWithTag ("LoginPanel");

            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                loginScript.onConnectedSuccessfully();
                m_apppwarp.isConnected = true;
            }
            else if (eventObj.getResult() == WarpResponseResultCode.SUCCESS_RECOVERED)
            {
                Debug.Log("onConnectDone >>  Recovered Done" + eventObj.getResult());
            }
            else if (eventObj.getResult() == WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE)
            {
                Debug.Log("onConnectDone >> Connection Recoverable" + eventObj.getResult());
                StartCoroutine(ReconnectToServer());
            }
            else if (eventObj.getResult() == WarpResponseResultCode.CONNECTION_ERR)
            {
                loginScript.onConnectedFail("" + eventObj.getResult());
                m_apppwarp.isConnected = false;
            }
        }
 public void onConnectToAppWarp(ConnectEvent eventObj)
 {
     Debug.Log("onConnectToAppWarp " + eventObj.getResult());
     if (eventObj.getResult () == 0){
         isUserConnected = true;
         SC_AppWarpKit.GetRoomsInRange(1,2);
     }
     else {
         isUserConnected = false;
     }
 }
Ejemplo n.º 12
0
        //ConnectionRequestListener
        public void onConnectDone(ConnectEvent eventObj)
        {
            if (eventObj.getResult() == 0)
            {
                WarpClient.GetInstance().SubscribeRoom(m_apppwarp.roomid);
            }
            Log("onConnectDone : " + eventObj.getResult());

            gameObject.name = appwarp.username;
            WarpClient.GetInstance().initUDP();
        }
        //ConnectionRequestListener
        public void onConnectDone(ConnectEvent eventObj)
        {
            if(eventObj.getResult() == 0)
            {
                //WarpClient.GetInstance().SubscribeRoom(m_apppwarp.roomid);
            }
            Log ("onConnectDone : " + eventObj.getResult());

            //gameObject.name = appwarp.username;
            //WarpClient.GetInstance().initUDP();
        }
Ejemplo n.º 14
0
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     Debug.Log("onDisconnectDone : " + eventObj.getResult());
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
     }
     else
     {
         Utils.showToastAlertOnUIThread(Constants.ALERT_ERR_DISCONN);
     }
 }
Ejemplo n.º 15
0
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     if(eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Debug.Log("Disconnect Successful");
     }
     else {
         Debug.Log("Disconnect Failed");
     }
     Log("onDisconnectDone : " + eventObj.getResult());
 }
Ejemplo n.º 16
0
    public void onConnectToAppWarp(ConnectEvent eventObj)
    {
        if (eventObj.getResult() == 0)
        {
            Debug.Log("onConnectToAppWarp " + eventObj.getResult());
            ConnStater.Set__connection_status(true);

            myPlayerBoard_Ready = true;

            SC_AppWarpKit.GetRoomsInRange(1, 1);
        }
    }
Ejemplo n.º 17
0
 //ConnectionRequestListener
 public void onConnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == 0)
     {
         WarpClient.GetInstance().SubscribeLobby();
         Log("lobby subscribed");
     }
     else
     {
         Log("On Connect Done " + eventObj.getResult().ToString());
     }
 }
Ejemplo n.º 18
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         StartActivity(typeof(MenuActitvity));
         this.Finish();
     }
     else
     {
         RunOnUiThread(() => Toast.MakeText(this, "Connection error " + eventObj.getResult(), ToastLength.Long).Show());
     }
 }
Ejemplo n.º 19
0
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     Debug.Log("onDisconnectDone : " + eventObj.getResult());
     if (eventObj.getResult() == 0 && OnDisconnect != null)
     {
         OnDisconnect(true);
     }
     else if (OnDisconnect != null)
     {
         OnDisconnect(false);
     }
 }
Ejemplo n.º 20
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            Debug.WriteLine("Connect Done: " + eventObj.getResult());
            String subMessage = "";

            switch (eventObj.getResult())
            {
            case WarpResponseResultCode.AUTH_ERROR:
                if (eventObj.getReasonCode() == WarpReasonCode.WAITING_FOR_PAUSED_USER)
                {
                    Debug.WriteLine("Connection state : " + WarpClient.GetInstance().GetConnectionState());
                    subMessage = "Auth Error Waiting for Paused User";

                    //int sessionID = (int)DBManager.getDBData("SessionID");
                    //Debug.WriteLine("Auth Error for paused user " + sessionID);
                    //WarpClient.GetInstance().RecoverConnectionWithSessionId(sessionID, "rahul");
                }
                else
                {
                    Debug.WriteLine("Auth Error session id expired");
                }
                break;

            case WarpResponseResultCode.SUCCESS:
                subMessage = "success";
                WarpClient.GetInstance().Disconnect();
                //DBManager.saveData("SessionID", WarpClient.GetInstance().GetSessionId());
                // _page.showResult("connection success");
                break;

            case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                subMessage = "connection error recoverable";
                // _page.showResult("connection recoverable " + eventObj.getResult());
                // Deployment.Current.Dispatcher.BeginInvoke(delegate() {   RecoverConnection(); });
                break;

            case WarpResponseResultCode.SUCCESS_RECOVERED:
                subMessage = "connection success recoverd";
                break;

            default:

                break;
            }
            UIDispatcher.Execute(delegate() {
                if (tblmessage.Text.Length > 200)
                {
                    tblmessage.Text = "";
                }
                tblmessage.Text = tblmessage.Text + "\nConnect Done: " + subMessage;
            });
        }
        public void onConnectDone(ConnectEvent eventObj)
        {
            Debug.Log("Connection " + eventObj.getResult());
            switch (eventObj.getResult())
            {
            case WarpResponseResultCode.SUCCESS:
            {
                RouletteDelegate.onErrorOccure(ErrorType.RecoverConnection);
                WarpClient.GetInstance().JoinRoomInRange(0, 4, true);
            }
            break;

            case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
            {
                if (WarpClient.GetInstance() != null)
                {
                    WarpClient.GetInstance().RecoverConnection();
                }
                RouletteDelegate.onErrorOccure(ErrorType.ConnectionTempraryError);
            }
            break;

            case WarpResponseResultCode.SUCCESS_RECOVERED:
            {
                RouletteDelegate.onErrorOccure(ErrorType.RecoverConnection);
            }
            break;

            case WarpResponseResultCode.CONNECTION_ERR:
            {
                RouletteDelegate.onErrorOccure(ErrorType.ConnectionNotFound);
            }
            break;

            case WarpResponseResultCode.AUTH_ERROR:
            {
                RouletteDelegate.onErrorOccure(ErrorType.ConnectionNotFound);
            }
            break;

            case WarpResponseResultCode.BAD_REQUEST:
            {
                RouletteDelegate.onErrorOccure(ErrorType.ConnectionNotFound);
            }
            break;

            default:


                break;
            }
        }
Ejemplo n.º 22
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     if(eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         WarpClient.GetInstance().JoinRoom(AppWarp.roomid);
         Debug.Log("Connection Successful");
     }
     else {
         Debug.Log("Connection Failed");
     }
     Debug.Log ("onConnectDone : " + eventObj.getResult());
     Log ("onConnectDone : " + eventObj.getResult());
 }
 public void onConnectToAppWarp(ConnectEvent eventObj)
 {
     Debug.Log("onConnectToAppWarp " + eventObj.getResult());
     if (eventObj.getResult() == 0)
     {
         unityUIObjects["LoadingText"].GetComponent<Text>().text = "Finding a room...";
         isUserConnected = true;
         SC_AppWarpKit.GetRoomsInRange(1, 2);
     }
     else
     {
         isUserConnected = false;
     }
 }
Ejemplo n.º 24
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     Debug.Log ("onConnectDone : " + eventObj.getResult());
     if (eventObj.getResult () == WarpResponseResultCode.SUCCESS) {
     //			WarpClient.GetInstance ().CreateRoom ("Testwww", "Himawwnshu", 5, null);
         appWarpResponse += "onConnected Successfully " + eventObj.getResult ()+"\n";
     } else if (eventObj.getResult () == WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE) {
         //			WarpClient.GetInstance ().CreateRoom ("Testwww", "Himawwnshu", 5, null);
         theClient.RecoverConnection();
         appWarpResponse += "Coonection error Recoverable " + eventObj.getResult ()+"\n";
     } else if (eventObj.getResult () == WarpResponseResultCode.SUCCESS_RECOVERED) {
         //			WarpClient.GetInstance ().CreateRoom ("Testwww", "Himawwnshu", 5, null);
         appWarpResponse += "Coonection Recoverd "+ "\n";
     }
     else if (eventObj.getResult () == WarpResponseResultCode.AUTH_ERROR) {
         //			WarpClient.GetInstance ().CreateRoom ("Testwww", "Himawwnshu", 5, null);
         appWarpResponse += "Authentication Error" +"\n";
     }
     else
     {
         appWarpResponse+="onConnectDone Error "+eventObj.getResult()+"\n";
     }
     //JoinRoom ();
     //Log ("onConnectDone : " + eventObj.getResult());
 }
Ejemplo n.º 25
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            switch (eventObj.getResult())
            {
            case WarpResponseResultCode.SUCCESS:
                Debug.WriteLine("\nConnection Success\n");
                GlobalContext.IsConnectedToAppWarp = true;
                _recoverCounts = 0;
                Deployment.Current.Dispatcher.BeginInvoke(delegate()
                {
                    if (GlobalContext.tableProperties["IsPrivateRoom"].Equals("false"))
                    {
                        WarpClient.GetInstance().JoinRoomWithProperties(GlobalContext.tableProperties);
                    }
                });
                break;

            case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                Deployment.Current.Dispatcher.BeginInvoke(delegate(){ RecoverConnection(); });
                break;

            case WarpResponseResultCode.SUCCESS_RECOVERED:
                break;

            default:
                if (App.CurrentPage.Equals("HomePage"))
                {
                    Deployment.Current.Dispatcher.BeginInvoke(delegate() { App.g_HomePageListener.ConnectionFailed(); });
                }
                GlobalContext.IsConnectedToAppWarp = false;
                break;
            }
        }
        public void onConnectDone(ConnectEvent eventObj)
        {
            switch (eventObj.getResult())
            {
                case WarpResponseResultCode.SUCCESS:
                    Debug.WriteLine("\nConnection Success\n");
                     GlobalContext.IsConnectedToAppWarp = true;
                     _recoverCounts = 0;
                     Deployment.Current.Dispatcher.BeginInvoke(delegate()
                     {
                         if (GlobalContext.tableProperties["IsPrivateRoom"].Equals("false"))
                             WarpClient.GetInstance().JoinRoomWithProperties(GlobalContext.tableProperties);
                     });
                      break;
                case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                     Deployment.Current.Dispatcher.BeginInvoke(delegate(){RecoverConnection();});
                      break;
                case WarpResponseResultCode.SUCCESS_RECOVERED:
                     break;
                default:
                     if(App.CurrentPage.Equals("HomePage"))
                      Deployment.Current.Dispatcher.BeginInvoke(delegate() { App.g_HomePageListener.ConnectionFailed(); });
                      GlobalContext.IsConnectedToAppWarp = false;
                      break;

            }
        }
Ejemplo n.º 27
0
 public void onDisconnectDone(ConnectEvent evt)
 {
     if (evt.getResult () == WarpResponseResultCode.SUCCESS) {
         Console.WriteLine ("Disconnect Successful");
     } else {
         Console.WriteLine ("Disconnect Failed");
     }
 }
Ejemplo n.º 28
0
    //ConnectionRequestListener
    public void onConnectDone(ConnectEvent eventObj)
    {
        Log("onConnectDone : " + eventObj.getResult());

        if (MultiplayerManager.useUDP)
        {
            WarpClient.GetInstance().initUDP();
        }

        if (LoginResultScreen.login_result == 0 && eventObj.getResult() == 0)
        {
            LoginResultScreen.RedirectToRoomSelection();
        }
        else
        {
            LoginResultScreen.login_result = eventObj.getResult();
        }
    }
Ejemplo n.º 29
0
 public void onConnectDone(ConnectEvent evt)
 {
     if (evt.getResult () == WarpResponseResultCode.SUCCESS) {
         Console.WriteLine ("Connection Successful");
         WarpClient.GetInstance().JoinRoom(Constants.CHAT_ROOM_ID);
     } else {
         Console.WriteLine ("Connection Failed");
     }
 }
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         _page.showResult("disconnection success");
     }
     else
     {
         _page.showResult("diconnection failed");
     }
 }
Ejemplo n.º 31
0
 public void onDisconnectDone(ConnectEvent evt)
 {
     if (evt.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Console.WriteLine("Disconnect Successful");
     }
     else
     {
         Console.WriteLine("Disconnect Failed");
     }
 }
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         _page.showResult("disconnection success");
     }
     else
     {
         _page.showResult("diconnection failed");
     }
 }
 public void onJoinZoneDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         // We have successfully joined the zone. Lets go ahead and join the room.
         WarpClient.GetInstance().JoinRoom(GlobalContext.GameRoomId);
     }
     else
     {
         _page.showResult("Join zone failed");
     }
 }
Ejemplo n.º 34
0
 public void onConnectDone(ConnectEvent evt)
 {
     if (evt.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Console.WriteLine("Connection Successful");
         WarpClient.GetInstance().JoinRoom(Constants.CHAT_ROOM_ID);
     }
     else
     {
         Console.WriteLine("Connection Failed");
     }
 }
 public void onConnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         // Successfully connected to the server. We can go ahead and join our app's zone.
         WarpClient.GetInstance().JoinZone(GlobalContext.localUsername);
     }
     else
     {
         _page.showResult("connection failed");
     }
 }
Ejemplo n.º 36
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Console.WriteLine("connection success2");
         Listener.ConnectDone();
     }
     else
     {
         Console.WriteLine("connection fail");
     }
 }
 public void onConnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         // Successfully connected to the server. Lets go ahead and join the room.
         WarpClient.GetInstance().JoinRoom(GlobalContext.GameRoomId);
     }
     else
     {
         _page.showResult("connection failed");
     }
 }
Ejemplo n.º 38
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            UIDispatcher.Execute(delegate() { tblmessage.Text = "Connect Done: " + eventObj.getResult(); });
            switch (eventObj.getResult())
            {
                case WarpResponseResultCode.SUCCESS:
                    // _page.showResult("connection success");
                    break;
                case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                    // _page.showResult("connection recoverable " + eventObj.getResult());
                    // Deployment.Current.Dispatcher.BeginInvoke(delegate() {   RecoverConnection(); });
                    break;
                case WarpResponseResultCode.SUCCESS_RECOVERED:
                    //_page.showResult("connection success recovered " + eventObj.getResult());
                    // Deployment.Current.Dispatcher.BeginInvoke(delegate() { ConnectionRecovered(); });
                    break;
                default:

                    break;
            }
        }
 public void onConnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         // Successfully connected to the server. Lets go ahead and join the room.
         WarpClient.GetInstance().JoinRoom(GlobalContext.GameRoomId);
     }
     else
     {
         _page.showResult("connection failed");
     }
 }
Ejemplo n.º 40
0
    //ConnectionRequestListener
    #region ConnectionRequestListener
    public void onConnectDone(ConnectEvent eventObj)
    {
        if (!ReferenceEquals(null, progressDialog))          //if(progressDialog!=null)
        {
            progressDialog.dismiss();
            progressDialog = null;
        }

        Debug.Log("GAMECONTROLLER onConnectDone : " + eventObj.getResult());
        if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
        {
            Debug.Log("SUCCESS");
            // SUCCESS
        }
        else if (eventObj.getResult() == WarpResponseResultCode.BAD_REQUEST)
        {
            theClient.Disconnect();
        }
        else
        {
            Utils.showToastAlert(Constants.ALERT_CONN_FAIL + " " + eventObj.getResult());
        }
    }
Ejemplo n.º 41
0
 //ConnectionRequestListener
 #region ConnectionRequestListener
 public void onConnectDone(ConnectEvent eventObj)
 {
     if (eventObj.getResult() == 0)
     {
         if (OnConnect != null)
         {
             OnConnect(true);
         }
     }
     else
     {
         if (OnConnect != null)
         {
             OnConnect(false);
         }
     }
 }
Ejemplo n.º 42
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                _page.showResult("connection success");

                //перенаправлення на сторінку
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    _page.NavigationService.Navigate(new Uri("/Views/RoomsListPage.xaml", UriKind.Relative));
                });
            }
            else
            {
                _page.showResult("connection fail");
            }
        }
        public void onConnectDone(ConnectEvent eventObj)
        {
            switch (eventObj.getResult())
            {
            case WarpResponseResultCode.SUCCESS:
                GlobalContext.IsConnectedToAppWarp = true;
                _recoverCounts = 0;
                // Successfully connected to the server. Lets go ahead and init the udp.
                //Init udp is essentional if we are using UDP communication in our Game
                WarpClient.GetInstance().initUDP();
                if (mOnConnectDoneCallback != null)
                {        //Request Was From Main Screen
                    Deployment.Current.Dispatcher.BeginInvoke(new ConnectionCallback(mOnConnectDoneCallback));
                }
                else if ((mOnConnectDoneCallback == null) && mShowResultCallback != null)
                {
                    //Request Was From Join Screen
                    Deployment.Current.Dispatcher.BeginInvoke(new ShowResultCallback(mShowResultCallback), "connected");
                }
                break;

            case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                Deployment.Current.Dispatcher.BeginInvoke(delegate(){ RecoverConnection(); });
                if (mConnectionRecoverableError != null)
                {
                    Deployment.Current.Dispatcher.BeginInvoke(new ConnectionCallback(mConnectionRecoverableError));
                }
                break;

            case WarpResponseResultCode.SUCCESS_RECOVERED:
                Deployment.Current.Dispatcher.BeginInvoke(delegate() { ConnectionRecovered(); });
                if (mConnectionRecoverd != null)
                {
                    Deployment.Current.Dispatcher.BeginInvoke(new ConnectionCallback(mConnectionRecoverd));
                }
                break;

            default:
                GlobalContext.IsConnectedToAppWarp = false;
                if (mShowResultCallback != null)
                {
                    Deployment.Current.Dispatcher.BeginInvoke(new ShowResultCallback(mShowResultCallback), "connection failed");
                }
                break;
            }
        }
Ejemplo n.º 44
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                _page.showResult("connection success");

                //перенаправлення на сторінку
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    _page.NavigationService.Navigate(new Uri("/Views/RoomsListPage.xaml", UriKind.Relative));
                });
                
            }
            else
            {
                _page.showResult("connection fail");
            }

        }
Ejemplo n.º 45
0
        public void onDisconnectDone(ConnectEvent eventObj)
        {
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                Global.disconnectSuccess = true;

                System.Diagnostics.Debug.WriteLine("successfully disconnected");
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("Disconnect Done :)");
                });
                // _page.showresult("disconnection success");
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("not successfully disconnected");
                //Global.disconnectSuccess = true;
                // _page.showresult("diconnection failed");
            }
        }
        public void onConnectDone(ConnectEvent eventObj)
        {
            switch (eventObj.getResult())
            {
                case WarpResponseResultCode.SUCCESS:
                     GlobalContext.IsConnectedToAppWarp = true;
                     _recoverCounts = 0;
                     // Successfully connected to the server. Lets go ahead and init the udp.
                     //Init udp is essentional if we are using UDP communication in our Game
                     WarpClient.GetInstance().initUDP();
                     if (mOnConnectDoneCallback != null)
                     {   //Request Was From Main Screen
                         Deployment.Current.Dispatcher.BeginInvoke(new ConnectionCallback(mOnConnectDoneCallback));
                     }
                     else if ((mOnConnectDoneCallback == null) && mShowResultCallback != null)
                     {
                      //Request Was From Join Screen
                      Deployment.Current.Dispatcher.BeginInvoke(new ShowResultCallback(mShowResultCallback), "connected");
                     }
                      break;
                case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                       Deployment.Current.Dispatcher.BeginInvoke(delegate(){RecoverConnection();});
                      if (mConnectionRecoverableError != null)
                          Deployment.Current.Dispatcher.BeginInvoke(new ConnectionCallback(mConnectionRecoverableError));
                      break;
                case WarpResponseResultCode.SUCCESS_RECOVERED:
                      Deployment.Current.Dispatcher.BeginInvoke(delegate() { ConnectionRecovered(); });
                    if(mConnectionRecoverd!=null)
                      Deployment.Current.Dispatcher.BeginInvoke(new ConnectionCallback(mConnectionRecoverd));
                     break;
                default:
                      GlobalContext.IsConnectedToAppWarp = false;
                      if (mShowResultCallback != null)
                      Deployment.Current.Dispatcher.BeginInvoke(new ShowResultCallback(mShowResultCallback), "connection failed");
                      break;

            }
        }
Ejemplo n.º 47
0
 public void onDisconnectFromAppWarp(ConnectEvent eventObj)
 {
     Debug.Log("onDisconnectFromAppWarp " + eventObj.getResult());
     guiText.text += "Disconnected from AppWrap" + System.Environment.NewLine;
 }
Ejemplo n.º 48
0
 public void onConnectDone(ConnectEvent eventObj)
 {
     Log("onConnectDone : ", eventObj.getResult());
     WarpClient.GetInstance().GetRoomsInRange(1, 1);
 }
Ejemplo n.º 49
0
        public void onConnectDone(ConnectEvent eventObj)
        {
            //WarpClient.GetInstance().initUDP();
            Debug.Log("Connection " + eventObj.getResult());

            switch (eventObj.getResult())
            {
            case WarpResponseResultCode.SUCCESS:
            {
                m_apppwarp.GameStart = true;
                appwarp.sessionID    = WarpClient.GetInstance().GetSessionId();
                // Debug.Log("Player join appwarp");
                m_apppwarp.newConnection = false;
                GameController.Message   = "Waiting for opponent ";
                // Debug.Log("GameConstantData.GameType " + GameConstantData.GameType);

                if (GameConstantData.GameType == GameConstantData.Practice)
                {
                    // Debug.Log("Create Practice Game");
                    Dictionary <string, object> dic = new Dictionary <string, object>();
                    dic.Add(Tags.GameType, GameConstantData.GameType);
                    dic.Add(Tags.GAME_ENTRY, GameConstantData.entryFee);
                    dic.Add(Tags.GAME_PRICE, GameConstantData.winingAmount);
                    dic.Add(Tags.UserLimit, GameConstantData.UserLimit);
                    dic.Add("TOKEN_LIMIT", GameConstantData.TokenLimit);
                    dic.Add(Tags.DOMAIN, Tags.URL);
                    WarpClient.GetInstance().CreateRoom("Practice", "Ludo", 1, dic);
                }
                if (GameConstantData.GameType == GameConstantData.OneToOne)
                {
                    // Debug.Log("Join One2One Game");
                    Dictionary <string, object> dic = new Dictionary <string, object>();
                    dic.Add(Tags.GameType, GameConstantData.GameType);
                    dic.Add(Tags.GAME_ENTRY, GameConstantData.entryFee);
                    dic.Add(Tags.GAME_PRICE, GameConstantData.winingAmount);
                    dic.Add("TOKEN_LIMIT", GameConstantData.TokenLimit);
                    dic.Add(Tags.UserLimit, GameConstantData.UserLimit);
                    dic.Add(Tags.DOMAIN, Tags.URL);
                    WarpClient.GetInstance().JoinRoomWithProperties(dic);
                }

                if (GameConstantData.GameType == GameConstantData.OneToFour)
                {
                    // Debug.Log("Join One2Four Game");
                    Dictionary <string, object> dic = new Dictionary <string, object>();
                    dic.Add(Tags.GameType, GameConstantData.GameType);
                    dic.Add(Tags.GAME_ENTRY, GameConstantData.entryFee);
                    dic.Add(Tags.GAME_PRICE, GameConstantData.winingAmount);
                    dic.Add("TOKEN_LIMIT", GameConstantData.TokenLimit);
                    dic.Add(Tags.UserLimit, GameConstantData.UserLimit);
                    dic.Add(Tags.DOMAIN, Tags.URL);
                    WarpClient.GetInstance().JoinRoomWithProperties(dic);
                }
                string playerType = SecurePlayerPrefs.GetString(GameTags.PRIVATE_TABLE_TYPE);
                if (GameConstantData.GameType == GameConstantData.Private)
                {
                    if (playerType.Equals(GameTags.CREATE_TABLE))
                    {
                        Dictionary <string, object> dic = new Dictionary <string, object>();
                        dic.Add(Tags.GameType, GameConstantData.GameType);
                        dic.Add(Tags.GAME_ENTRY, GameConstantData.entryFee);
                        dic.Add(Tags.GAME_PRICE, GameConstantData.winingAmount);
                        dic.Add("TOKEN_LIMIT", GameConstantData.TokenLimit);
                        dic.Add(Tags.UserLimit, GameConstantData.UserLimit);
                        dic.Add(Tags.DOMAIN, Tags.URL);
                        // Debug.Log("Create Private Game");
                        WarpClient.GetInstance().CreateRoom("private", "ludo", 2, dic);
                    }
                    if ((playerType.Equals(GameTags.JOIN_TABLE)))
                    {
                        // Debug.Log("Waiting for Join ");
                    }
                }


                // Debug.Log ("Player join appwarp " + playerType);
                if ((playerType.Equals(GameTags.JOIN_TABLE)))
                {
                    // Debug.Log ("join table  ");
                }
                else if ((playerType.Equals(GameTags.FB_FRIEND_ONLINE)))
                {
                    // Debug.Log ("join FB_FRIEND_ONLINE  ");
                    if (WarpClient.GetInstance() != null)
                    {
                        WarpClient.GetInstance().JoinRoom(SecurePlayerPrefs.GetString(GetPlayerDetailsTags.ROOM_ID));
                    }
                }
            }
            break;

            case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
            {
                GameDelegate.changeSocketConnection(false);
                tempConnectionError = true;
                //// Debug.Log ("Weak connection");
                // ("Weak connection");
                // GameController.Message = "Recovering Connection";
                //GameController.Message1 = "Recovering Connection ";
                //if (WarpClient.GetInstance() != null)
                //{
                //    WarpClient.GetInstance().RecoverConnection();
                //}
            }
            break;

            case WarpResponseResultCode.SUCCESS_RECOVERED:
            {
                // ("Connection recover");
                GameController.Message1 = "";
                // GameController.Message = "Recovering Connection success ";
                GameDelegate.changeSocketConnection(true);
                tempConnectionError = false;
                //// Debug.Log ("Recover connection");
            }
            break;

            case WarpResponseResultCode.CONNECTION_ERR:
            {
                // Debug.Log ("CONNECTION_ERR  has been occur");
                //GameController.showErrorMsgl ();
                GameController.Message = " Connection error ";
                GameDelegate.changeSocketConnection(false);
            }
            break;

            case WarpResponseResultCode.AUTH_ERROR:
            {
                // Debug.Log ("AUTH_ERROR has been occur");
                //GameController.showErrorMsgl ();
                //ErroeMsg ();
                GameDelegate.changeSocketConnection(false);
                //UnityMainThreadDispatcher.Instance().Enqueue(ErroeMsg());
                //				GetComponent<GameScene> ().reconnectPanel.SetActive (true);

                GameController.Message = "Server not responding. try again";
            }
            break;

            case WarpResponseResultCode.BAD_REQUEST:
            {
                GameController.Message = "Server not responding. try again";

                // Debug.Log ("BAD_REQUEST has been occur");
                if (m_apppwarp.newConnection)
                {
                    // Debug.Log("refresh connection");
                    string player_name = UserController.getInstance.ID;
                    WarpClient.GetInstance().Disconnect();
                    WarpClient.GetInstance().Connect(player_name, "");
                }
                else
                {
                    GameDelegate.changeSocketConnection(false);
                }
                //GameController.showErrorMsgl ();
                //				GetComponent<GameScene> ().reconnectPanel.SetActive (true);
                //ErroeMsg();

                //UnityMainThreadDispatcher.Instance().Enqueue(ErroeMsg());
            }
            break;

            default:


                break;
            }
        }
Ejemplo n.º 50
0
        /*
        public void RecoverConnection()
        {
            if (_recoverCounts == 0)
            {
                timer = new DispatcherTimer();
                timer.Tick += timer_Tick;
                timer.Interval = new TimeSpan(0, 0, 0, 10);
                timer.Start();
            }

        }
        public void ConnectionRecovered()
        {
            timer.Stop();
            _recoverCounts = 0;
        }
        private void timer_Tick(object sender, EventArgs e)
        {
            _recoverCounts++;
            if (_recoverCounts <= 6)
            {
                WarpClient.GetInstance().RecoverConnection();
            }
            else
            {
                (sender as DispatcherTimer).Stop();
                _page.showResult("connection failed");
            }
        }*/
        public void onDisconnectDone(ConnectEvent eventObj)
        {
            UIDispatcher.Execute(delegate()
            {
                tblmessage.Text = "Disconnect Done: " + eventObj.getResult();
                if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
                {

                }
                else
                {

                }

            });
        }
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     Log("onDisconnectDone : " + eventObj.getResult());
 }
Ejemplo n.º 52
0
    public void onConnectDone(ConnectEvent eventObj)
    {
        switch (eventObj.getResult())
        {
        case WarpResponseResultCode.SUCCESS:
            Debug.Log("[WarpNetworkManager] connection success: " + eventObj.getResult().ToString() + "Subscribe to Room");
            WarpNetworkManager.Instance.SubscribeRoom();
            break;

        case WarpResponseResultCode.CONNECTION_ERR:
            Debug.Log("[WarpNetworkManager] connection error [Non-Recoverable]: " + eventObj.getResult().ToString());
            break;

        case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
            Debug.Log("[WarpNetworkManager] connection error [Recoverable]: " + eventObj.getResult().ToString());
            WarpNetworkManager.Instance.ReconnectToServer();
            break;

        case WarpResponseResultCode.AUTH_ERROR:
            Debug.Log("[WarpNetworkManager] connection error: " + eventObj.getResult().ToString());
            break;

        case WarpResponseResultCode.BAD_REQUEST:
            Debug.Log("[WarpNetworkManager] connection error: " + eventObj.getResult().ToString());
            break;

        case WarpResponseResultCode.RESOURCE_MOVED:
            Debug.Log("[WarpNetworkManager] connection error: " + eventObj.getResult().ToString());
            break;

        case WarpResponseResultCode.RESOURCE_NOT_FOUND:
            Debug.Log("[WarpNetworkManager] connection error: " + eventObj.getResult().ToString());
            break;

        case WarpResponseResultCode.RESULT_SIZE_ERROR:
            Debug.Log("[WarpNetworkManager] connection error: " + eventObj.getResult().ToString());
            break;

        case WarpResponseResultCode.UNKNOWN_ERROR:
            Debug.Log("[WarpNetworkManager] connection error: " + eventObj.getResult().ToString());
            break;

        case WarpResponseResultCode.USER_PAUSED_ERROR:
            Debug.Log("[WarpNetworkManager] connection error: " + eventObj.getResult().ToString());
            break;

        default:
            break;
        }
    }
Ejemplo n.º 53
0
        public void onDisconnectDone(ConnectEvent eventObj)
        {
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
            {
                Global.disconnectSuccess = true;

                System.Diagnostics.Debug.WriteLine("successfully disconnected");
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show("Disconnect Done :)");

                });
               // _page.showresult("disconnection success");
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("not successfully disconnected");
                //Global.disconnectSuccess = true;
               // _page.showresult("diconnection failed");
            }
        }
Ejemplo n.º 54
0
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     Log("onDisconnectDone : " + eventObj.getResult());
 }
 public void onConnectDone(ConnectEvent e)
 {
     switch (e.getResult ()) {
             case WarpResponseResultCode.AUTH_ERROR:
                     if (e.getReasonCode () == WarpReasonCode.WAITING_FOR_PAUSED_USER) {
                             Log ("Auth Error:Server is waiting from previous session");
                     } else {
                             Log ("Auth Error:SessionId Expired");
                     }
                     break;
             case WarpResponseResultCode.SUCCESS:
                     PlayerPrefs.SetInt ("SessionID", WarpClient.GetInstance ().GetSessionId ());
                     PlayerPrefs.Save ();
                     Log ("Connect Done ");
                     break;
             case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
                     Log ("Connect Error Recoverable ");
         //RecoverConnection();
                     break;
             case WarpResponseResultCode.SUCCESS_RECOVERED:
                     Log ("Connection Success Recovered");
         //ConnectionRecovered();
                     break;
             default:
                     Log ("Connect Failed " + e.getResult ());
                     break;
             }
 }
 public void onDisconnectFromAppWarp(ConnectEvent eventObj)
 {
     isUserConnected = false;
     Debug.Log("onDisconnectFromAppWarp " + eventObj.getResult());
 }
 public void onDisconnectDone(ConnectEvent e)
 {
     if (e.getResult () == 0) {
                     Log ("Disconnect Done ");
             } else {
                     Log ("Disconnect Failed " + e.getResult ());
             }
 }
Ejemplo n.º 58
0
//	public void onGameStarted(string sender, string rId, string nextTurn)
//	public void onGameStopped(string sender, string roomId)
//	public void onMoveCompleted(MoveEvent move)
//	public void onChatReceived (ChatEvent eventObj)

    //#region ConnectionRequestListener
    public void onConnectDone(ConnectEvent eventObj)
    {
        Debug.Log("ENGINE onConnectDone : " + eventObj.getResult() + eventObj.ToString());
    }
Ejemplo n.º 59
0
    public void onConnectDone(ConnectEvent eventObj)
    {
        Debug.Log("onConnectDone Result " + eventObj.getResult());

        switch (eventObj.getResult())
        {
        case WarpResponseResultCode.SUCCESS:
        {
            //Debug.Log ("Appwrap join success");

            GameControllerTeenPatti.TeenPatti_message = MessageScriptTeenPatti.APPWRAP_SUCCESS;
            // GameController.Message = MessageScriptTeenPatti.APPWRAP_SUCCESS;
            PlayerPrefs.SetInt("SESSION_ID", WarpClient.GetInstance().GetSessionId());
            // RouletteDelegate.onErrorOccure(ErrorType.RecoverConnection);
            GameControllerTeenPatti.NetworkStatus = NetworkTagsTeenPatti.CONNECTED;

            GameControllerTeenPatti.isConnected = true;
            if (GameControllerTeenPatti.GameType.Equals(TagsTeenpatti.PRIVATE))
            {
                if (GameControllerTeenPatti.PrivateGameType.Equals(TagsTeenpatti.CREATE_PRIVATE_TABLE))
                {
                    Dictionary <string, object> dic = new Dictionary <string, object>();
                    dic.Add(TagsTeenpatti.USER_TYPE, "" + PlayerPrefs.GetInt(PlayerDetails.RealMoney));
                    dic.Add(TagsTeenpatti.GAME_TYPE, "" + TagsTeenpatti.PRIVATE_GAME);
                    dic.Add(TagsTeenpatti.USER_LIMIT, "6");
                    dic.Add(TagsTeenpatti.CHALLENGE, GameControllerTeenPatti.isChallenge);
                    dic.Add(TagsTeenpatti.BOOT_AMOUNT, "" + GameControllerTeenPatti.BootAmount);
                    dic.Add(TagsTeenpatti.PORT_LIMIT, "" + GameControllerTeenPatti.PortLimit);
                    dic.Add(TagsTeenpatti.MAX_BET_AMOUNT, "" + GameControllerTeenPatti.MaxBetAmt);
                    dic.Add(TagsTeenpatti.DOMAIN, "" + TagsTeenpatti.URL);
                    dic.Add("VARIATION_TYPE", "1");
                    dic.Add(TagsTeenpatti.MAX_BLIND, "4");
                    WarpClient.GetInstance().CreateRoom("private", "teenpatti", 6, dic);
                }
                else if (GameControllerTeenPatti.PrivateGameType.Equals(TagsTeenpatti.JOIN_PRIVATE_TABLE))
                {
                }
            }
            else if (GameControllerTeenPatti.GameType.Equals(TagsTeenpatti.PUBLIC))
            {
                //Debug.Log ("GameType PUBLIC");
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add(TagsTeenpatti.USER_TYPE, "" + PlayerPrefs.GetInt(PlayerDetails.RealMoney));
                dic.Add(TagsTeenpatti.GAME_TYPE, "" + TagsTeenpatti.PUBLIC_GAME);
                dic.Add(TagsTeenpatti.BOOT_AMOUNT, "" + GameControllerTeenPatti.BootAmount);
                dic.Add(TagsTeenpatti.PORT_LIMIT, "" + GameControllerTeenPatti.PortLimit);
                dic.Add(TagsTeenpatti.MAX_BET_AMOUNT, "" + GameControllerTeenPatti.MaxBetAmt);
                dic.Add(TagsTeenpatti.DOMAIN, "" + TagsTeenpatti.URL);
                if (GameControllerTeenPatti.variation)
                {
                    dic.Add("VARIATION_TYPE", "1");
                }
                dic.Add(TagsTeenpatti.MAX_BLIND, "4");
                WarpClient.GetInstance().JoinRoomWithProperties(dic);
                //WarpClient.GetInstance ().JoinRoomInRange (1, 2, true);
            }
        }
        break;

        case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
        {
            //GameControllerTeenPatti.TeenPatti_message = MessageScriptTeenPatti.APPWRAP_CONNECTION_RECOVERABLE;
            //GameController.Message = MessageScriptTeenPatti.APPWRAP_CONNECTION_RECOVERABLE;
            // WarpClient.GetInstance().RecoverConnection();
            GameControllerTeenPatti.NetworkStatus = NetworkTagsTeenPatti.RECOVER_CONNECTION;
            //  RouletteDelegate.onErrorOccure(ErrorType.ConnectionTempraryError);
            GameControllerTeenPatti.isConnected = false;
            tempFail = true;
            //StartCoroutine(recover());
        }
        break;

        case WarpResponseResultCode.SUCCESS_RECOVERED:
        {
            //GameControllerTeenPatti.NetworkStatus = NetworkTagsTeenPatti.CONNECTED;
            GameControllerTeenPatti.isConnected = true;
            tempFail = false;
            //GameControllerTeenPatti.TeenPatti_message = MessageScriptTeenPatti.APPWRAP_RECOVERED_SUCCESS;
            // GameController.Message = MessageScriptTeenPatti.APPWRAP_RECOVERED_SUCCESS;
            //  RouletteDelegate.onErrorOccure(ErrorType.RecoverConnection);
        }
        break;

        case WarpResponseResultCode.CONNECTION_ERR:
        {
            GameControllerTeenPatti.TeenPatti_message = MessageScriptTeenPatti.APPWRAP_CONNECTION_ERROR;
            GameControllerTeenPatti.NetworkStatus     = NetworkTagsTeenPatti.NOT_CONNECTED;
            GameControllerTeenPatti.isConnected       = false;

            // RouletteDelegate.onErrorOccure(ErrorType.ConnectionNotFound);
            //GameController.Message =  MessageScriptTeenPatti.APPWRAP_CONNECTION_ERROR;
        }
        break;

        case WarpResponseResultCode.AUTH_ERROR:
        {
            GameControllerTeenPatti.NetworkStatus     = NetworkTagsTeenPatti.NOT_CONNECTED;
            GameControllerTeenPatti.TeenPatti_message = MessageScriptTeenPatti.APPWRAP_AUTH_ERROR;
            WarpClient.GetInstance().RecoverConnectionWithSessioId(PlayerPrefs.GetInt("SESSION_ID"), PlayerPrefs.GetString(PrefebTagsTeenpatti.PLAYER_ID));
            GameControllerTeenPatti.isConnected = false;
            tempFail = false;
        }
        break;

        case WarpResponseResultCode.BAD_REQUEST:
        {
            GameControllerTeenPatti.NetworkStatus     = NetworkTagsTeenPatti.NOT_CONNECTED;
            GameControllerTeenPatti.TeenPatti_message = MessageScriptTeenPatti.APPWRAP_AUTH_ERROR;
            GameControllerTeenPatti.isConnected       = false;
        }
        break;

        default:


            break;
        }
    }
Ejemplo n.º 60
0
 public void onDisconnectDone(ConnectEvent eventObj)
 {
     appWarpResponse+="onDisconnectDone"+eventObj.getResult()+"\n";
     Debug.Log ("onDisConnectDone : " + eventObj.getResult());
 }