public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS && (eventObj.getJoinedUsers() != null))
     {
         if (GlobalContext.localUsername.Equals(eventObj.getJoinedUsers()[0]))
         {
             // user who created the room is the first player
             GlobalContext.PlayerIsFirstOnAppWarp = true;
             GlobalContext.IsMyTurn = true;
         }
         else
         {
             // user who joined later is second player
             GlobalContext.PlayerIsFirstOnAppWarp = false;
             GlobalContext.IsMyTurn = false;
         }
         GlobalContext.tableProperties = eventObj.getProperties();
         for (int i = 0; i < eventObj.getJoinedUsers().Length; i++)
         {
             if (!GlobalContext.localUsername.Equals(eventObj.getJoinedUsers()[i]))
             {
                 GlobalContext.opponentName = eventObj.getJoinedUsers()[i];
                 break;
             }
         }
         GlobalContext.joinedUsers = eventObj.getJoinedUsers();
         Deployment.Current.Dispatcher.BeginInvoke(new MoveToPlayCallback(mMoveToPlay));
     }
 }
예제 #2
0
 public void onGetLiveLobbyInfoDone(LiveRoomInfoEvent eventObj)
 {
     String[] users = eventObj.getJoinedUsers();
     if (users != null && users.Length > 0)
     {
         for (int i = 0; i < users.Length; i++ )
             _page.showResult(users[i]);
     }
 }
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     _page.showResult("LiveRoominfo" + eventObj.getJoinedUsers().Length);
     GamePage.masItem = eventObj.getJoinedUsers().Length - 1;
     //Maxusers = int.Parse(eventObj.getData().getMaxUsers().ToString());
     GamePage.maxUsers = int.Parse(eventObj.getData().getMaxUsers().ToString());
     //RoomData d = new RoomData("1995630518","1","s", 3);
     //Balls.cPos = new Microsoft.Xna.Framework.Vector2[eventObj.getData().getMaxUsers()];
     //Balls.sPos = new Microsoft.Xna.Framework.Vector2[eventObj.getData().getMaxUsers()];
     //_page.showResult("Max" + eventObj.getData().getMaxUsers().ToString());
 }
 public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
 {
     if (WarpResponseResultCode.SUCCESS == eventObj.getResult())
     {
         _page.showResult("UpdateProperty event received with success status");
     }
     else
     {
         _page.showResult("Update Propert event received with fail status. Status is :" + eventObj.getResult().ToString());
     }
 }
예제 #5
0
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     _page.showResult("LiveRoominfo" + eventObj.getJoinedUsers().Length);
     GamePage.masItem = eventObj.getJoinedUsers().Length - 1;
     //Maxusers = int.Parse(eventObj.getData().getMaxUsers().ToString());
     GamePage.maxUsers = int.Parse(eventObj.getData().getMaxUsers().ToString());
     //RoomData d = new RoomData("1995630518","1","s", 3);
     //Balls.cPos = new Microsoft.Xna.Framework.Vector2[eventObj.getData().getMaxUsers()];
     //Balls.sPos = new Microsoft.Xna.Framework.Vector2[eventObj.getData().getMaxUsers()];
     //_page.showResult("Max" + eventObj.getData().getMaxUsers().ToString());
 }
예제 #6
0
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     Log("onGetLiveRoomInfoDone : ", eventObj.getResult());
     if ((ResultCode)eventObj.getResult() == ResultCode.SUCCESS)
     {
         if (roomFoundEvent != null)
         {
             roomFoundEvent(eventObj.getProperties());
         }
     }
 }
예제 #7
0
 public void onGetLiveLobbyInfoDone(LiveRoomInfoEvent eventObj)
 {
     String[] users = eventObj.getJoinedUsers();
     if (users != null && users.Length > 0)
     {
         for (int i = 0; i < users.Length; i++)
         {
             _page.showResult(users[i]);
         }
     }
 }
예제 #8
0
 public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
 {
     if (WarpResponseResultCode.SUCCESS == eventObj.getResult())
     {
         Log("UpdateProperty event received with success status");
     }
     else
     {
         Log("Update Propert event received with fail status. Status is :" + eventObj.getResult().ToString());
     }
 }
    public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
    {
        //Twist.AppController.showToast ("onUpdatePropertyDone");

        if (WarpResponseResultCode.SUCCESS == eventObj.getResult())
        {
        }
        else
        {
        }
    }
예제 #10
0
    public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
    {
        Dictionary <string, object> _parms = eventObj.getProperties();

        //Debug.Log(_parms["Password"]);
        if (_parms["Password"].ToString() == matchRoomData["Password"].ToString())
        {
            roomId = eventObj.getData().getId();
            JoinAndSubscribeRoom(roomId);
        }
        else
        {
            roomIndex++;
            DoRoomSearchLogic();
        }
    }
예제 #11
0
    private void OnGetLiveRoomInfo(LiveRoomInfoEvent _EventObj)
    {
        Dictionary <string, object> _params = _EventObj.getProperties();

        if (_params.ContainsKey("Password") == true && _params["Password"].ToString() == matchRoomData["Password"].ToString())
        {
            roomId = _EventObj.getData().getId();
            WarpClient.GetInstance().JoinRoom(roomId);
            WarpClient.GetInstance().SubscribeRoom(roomId);
        }
        else
        {
            roomIdx++;
            DoRoomSearchLogic();
        }
    }
예제 #12
0
    public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
    {
        Dictionary <string, object> _parms = eventObj.getProperties();
        List <string> UserList             = new List <string> (eventObj.getJoinedUsers());

        if (_parms["Password"].ToString() == matchRoomData["Password"].ToString() && int.Parse(_parms["PlayerCount"].ToString()) == MainGame.GetComponent <SC_Logics>().PlayerCount)
        {
            roomId = eventObj.getData().getId();
            WarpClient.GetInstance().JoinRoom(roomId);
            WarpClient.GetInstance().SubscribeRoom(roomId);
            MainGame.GetComponent <SC_Logics>().Myturn = UserList.Count + 1;
        }
        else
        {
            index++;
            DoRoomSearchLogic();
        }
    }
예제 #13
0
    public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
    {
        //todo: move this logic to model code:
        Dictionary <string, object> properties = eventObj.getProperties();

        Debug.Log(properties[SC_MenuModel.ROOM_GRP_PASSWORD_KEY]);;
        if (properties[SC_MenuModel.ROOM_GRP_PASSWORD_KEY].ToString() == model.MatchRoomData[SC_MenuModel.ROOM_GRP_PASSWORD_KEY].ToString())
        {
            roomId = eventObj.getData().getId();
            SharedDataHandler.client.JoinRoom(roomId);
            SharedDataHandler.client.SubscribeRoom(roomId);
        }
        else
        {
            roomIndex++;
            model.SearchRoom(roomIndex);
        }
    }
예제 #14
0
    private void OnGetLiveRoomInfo(LiveRoomInfoEvent _EventObj)
    {
        Dictionary <string, object> _params = _EventObj.getProperties();
        string _number = unityObjects["Text_RandomNumber"].GetComponent <Text>().text;

        Debug.Log("Text_RandomNumber: " + _params.ContainsKey(_number));
        Debug.Log("RandomNumber: " + _number);
        if (_params.ContainsKey(_number) && matchRoomData.ContainsKey(_number) &&
            _params[_number].ToString() == matchRoomData[_number].ToString())
        {
            roomId = _EventObj.getData().getId();
            WarpClient.GetInstance().JoinRoom(roomId);
            WarpClient.GetInstance().SubscribeRoom(roomId);
        }
        else
        {
            roomIdx++; DoRoomSearchLogic();
        }
    }
예제 #15
0
        public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
        {
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS && (eventObj.getJoinedUsers() != null))
            {
                if (eventObj.getJoinedUsers().Length == 1)
                {

                    GlobalContext.PlayerIsFirst = true;
                }

                else
                {
                    GlobalContext.PlayerIsFirst = false;
                }

                // navigate to game play screen
                _page.moveToPlayScreen();

            }
        }
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent liveRoomInfoObj)
 {
     if (liveRoomInfoObj.getData() != null)
     {
         GlobalContext.tableProperties = liveRoomInfoObj.getProperties();
         if ((liveRoomInfoObj.getJoinedUsers().Length == 2))
         {
             if (liveRoomInfoObj.getJoinedUsers()[0].Equals(GlobalContext.localUsername))
             {
                 GlobalContext.opponentName = liveRoomInfoObj.getJoinedUsers()[1];
             }
             else
             {
                 GlobalContext.opponentName = liveRoomInfoObj.getJoinedUsers()[0];
             }
             Debug.WriteLine("get Live RoomInfo");
             Deployment.Current.Dispatcher.BeginInvoke(delegate() { App.g_HomePageListener.StartQuiz(); });
         }
     }
 }
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent liveRoomInfoObj)
 {
     if (liveRoomInfoObj.getData() != null)
     {
         GlobalContext.tableProperties = liveRoomInfoObj.getProperties();
         if ((liveRoomInfoObj.getJoinedUsers().Length == 2))
         {
             if (liveRoomInfoObj.getJoinedUsers()[0].Equals(GlobalContext.localUsername))
             {
                 GlobalContext.opponentName = liveRoomInfoObj.getJoinedUsers()[1];
             }
             else
             {
                 GlobalContext.opponentName = liveRoomInfoObj.getJoinedUsers()[0];
             }
             Debug.WriteLine("get Live RoomInfo");
             Deployment.Current.Dispatcher.BeginInvoke(delegate() { App.g_HomePageListener.StartQuiz(); });
         }
     }
 }
예제 #18
0
    private void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
    {
        Dictionary <string, object> _prams = eventObj.getProperties();

        if (_prams != null && _prams.ContainsKey("Level"))
        {
            int _value = int.Parse(_prams["Level"].ToString());
            if (_value == int.Parse(matchRoomData["Level"].ToString()))
            {
                currRoomId = eventObj.getData().getId();
                Debug.Log("Joining Room " + currRoomId);
                WarpClient.GetInstance().JoinRoom(currRoomId);
                WarpClient.GetInstance().SubscribeRoom(currRoomId);
            }
            else
            {
                roomIdx++;
                DoRoomSearchLogic();
            }
        }
    }
    private void OnGetLiveRoomInfoOccured(LiveRoomInfoEvent eventObj)
    {
        Debug.Log("OnGetLiveRoomInfo " + eventObj.getData().getId() + " " + eventObj.getResult() + " " + eventObj.getJoinedUsers().Length);
        GameView.SetText("StatusTxt", "Room Information: " + eventObj.getData().getId() + " " + eventObj.getJoinedUsers().Length);
        Dictionary <string, object> _temp = eventObj.getProperties();

        Debug.Log(_temp.Count + " " + _temp["Password"] + " " + data["Password"].ToString());

        if (eventObj.getResult() == 0 && eventObj.getJoinedUsers().Length == 1 &&
            _temp["Password"].ToString() == data["Password"].ToString())
        {
            WarpClient.GetInstance().JoinRoom(eventObj.getData().getId());
            WarpClient.GetInstance().SubscribeRoom(eventObj.getData().getId());

            data["AwayPlayer"] = MiniJSON.Json.Serialize(GetLocalSoldiers().ToArray());

            WarpClient.GetInstance().UpdateRoomProperties(eventObj.getData().getId(), data, null);

            GameView.SetText("StatusTxt", "Joining Room...");
        }
        else
        {
            index++;
            if (index < rooms.Count)
            {
                Debug.Log("Getting Live Info on room: " + rooms[index]);
                WarpClient.GetInstance().GetLiveRoomInfo(rooms[index]);
            }
            else
            {
                Debug.Log("No rooms were availible, create a room");

                WarpClient.GetInstance().CreateTurnRoom("Room Name", username, 2, null, 30);

                data["HomePlayer" + username] = MiniJSON.Json.Serialize(GetLocalSoldiers().ToArray());
                WarpClient.GetInstance().UpdateRoomProperties(rooms[index], data, null);
            }
        }
    }
예제 #20
0
    private void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
    {
        Dictionary <string, object> _prams = eventObj.getProperties();

        if (_prams != null && _prams.ContainsKey("Password"))
        {
            string _pass = _prams["Password"].ToString();
            if (_pass == matchRoomData["Password"].ToString())
            {
                curRoomId = eventObj.getData().getId();
                UpdateStatus("Joining Room " + curRoomId);
                WarpClient.GetInstance().JoinRoom(curRoomId);
                WarpClient.GetInstance().SubscribeRoom(curRoomId);
            }
            else
            {
                roomIdx++;
                DoRoomSearchLogic();
                unityObjects["Btn_Play"].SetActive(true);
            }
        }
    }
예제 #21
0
    private void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
    {
        Dictionary <string, object> _prams = eventObj.getProperties();

        if (_prams != null && _prams.ContainsKey("Password"))
        {
            string _pass = _prams["Password"].ToString();
            Debug.Log("_pass - " + _pass);
            Debug.Log("_password - " + _password);
            Debug.Log("_passs - " + matchRoomData["Password"].ToString());

            if (_pass == matchRoomData["Password"].ToString())
            {
                curRoomId = eventObj.getData().getId();
                UpdateStatus("Joining Room " + curRoomId);
                if (_prams.ContainsKey("PlayerOneColor"))
                {
                    GameManager.Instance.PlayerTwoColor = GameManager.Instance.PlayerOneColor;
                    GameManager.Instance.PlayerOneColor = (Character.CharacterColors)Enum.Parse(typeof(Character.CharacterColors), _prams["PlayerOneColor"].ToString());
                    GameManager.Instance._playersDictionary.Add(eventObj.getData().getRoomOwner(), GameManager.Instance.PlayerOneColor);
                    var _maxX = GameManager.Instance.GetBoard.GetWidth - 1;
                    var _maxY = GameManager.Instance.GetBoard.GetHeight - 1;
                    Cursor.cursorInstance.MoveCursor(_maxX, _maxY);
                }

                Debug.Log("Player one color - " + GameManager.Instance.PlayerOneColor);
                WarpClient.GetInstance().JoinRoom(curRoomId);
                WarpClient.GetInstance().SubscribeRoom(curRoomId);
            }
            else
            {
                UpdateStatus("Password Incorrect");
                Debug.Log("Password Incorrect");
                roomIdx++;
                DoRoomSearchLogic();
            }
        }
    }
예제 #22
0
    public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
    {
        Debug.Log("OnGetLiveRoomInfo " + eventObj.getData().getId() + " " + eventObj.getResult() + " " + eventObj.getJoinedUsers().Length);
        Dictionary <string, object> _temp = eventObj.getProperties();

        print("bet = " + SC_DefiendVariables.bet);
        Debug.Log(_temp.Count + " " + _temp["bet"] + " " + SC_DefiendVariables.bet["bet"].ToString());

        if (eventObj.getResult() == 0 && eventObj.getJoinedUsers().Length == 1 &&
            _temp["bet"].ToString() == SC_DefiendVariables.bet["bet"].ToString())
        {
            print("entering the room!");
            currentTurn = SC_DefiendVariables.Turn.RedTurn;
            print("Enemy start the game!");
            WarpClient.GetInstance().JoinRoom(eventObj.getData().getId());
            WarpClient.GetInstance().SubscribeRoom(eventObj.getData().getId());
        }

        if (_temp["bet"].ToString() == SC_DefiendVariables.bet["bet"].ToString())
        {
            roomMatch = true;
        }
    }
예제 #23
0
        public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
        {
            Log ("onGetLiveRoomInfoDone : " + eventObj.getResult());

            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS && (eventObj.getJoinedUsers() != null))
            {
                AppWarp.InitializeNotification ();

                if (eventObj.getJoinedUsers().Length == 1)
                {
                    AppWarp.isFirstPlayer = true;
                    // Decide what string is for first player and what is for second player
                }
                else
                {
                    AppWarp.isFirstPlayer = false;

                    // Tell both players in room to load gameplay scene
                    AppWarp.warpClient.SendUpdatePeers(OnlineMessage.BuildBytes_NewMatch());
                }

                AppWarp.interval = 8.0f;
            }
        }
예제 #24
0
    private void HandleOnRoomInfoReceived(LiveRoomInfoEvent roomInfo)
    {
        if (roomid != roomInfo.getData().getId())
        {
            return;
        }

        roomid = roomInfo.getData().getId();

        Dictionary <string, object> rumData = roomInfo.getProperties();

        string sbChips = rumData [Constants.ROOM_PROP_MIN_CHIPS].ToString();

        string bbChips      = "";
        string userMinChips = "";
        string userMaxChips = "";

        if (sbChips != null)
        {
            bbChips      = (int.Parse(sbChips) * 2).ToString();
            userMinChips = (int.Parse(sbChips) * 20).ToString();
            userMaxChips = (int.Parse(userMinChips) * 20).ToString();

            blindText.text = sbChips + " / " + bbChips;
            chipsText.text = userMinChips + " / " + userMaxChips;
        }

        if (roomInfo.getJoinedUsers() == null)
        {
            totalPlayersText.text = "0 / " + roomInfo.getData().getMaxUsers();
        }
        else
        {
            totalPlayersText.text = roomInfo.getJoinedUsers().Length + " / " + roomInfo.getData().getMaxUsers();
        }
    }
예제 #25
0
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
     //Log ("onSetCustomRoomDataDone : " + eventObj.getResult());
 }
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     Log ("onGetLiveRoomInfoDone : " + eventObj.getResult());
 }
예제 #27
0
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
     //WarpClient.GetInstance().GetLiveRoomInfo(eventObj.getData().getId());
 }
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
     //WarpClient.GetInstance().GetLiveRoomInfo(eventObj.getData().getId());
 }
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     //throw new System.NotImplementedException ();
 }
예제 #30
0
    void OnGUI()
    {
        GUI.depth = 0;
        GUI.skin  = RoomSelectionGUISkin;

        GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), Background);

        if (GUI.Button(new Rect(Screen.width / 25, Screen.height / 25, Properties.BackButtonSize, Properties.BackButtonSize), Properties.BackButton))
        {
            Hide();
            WarpClient.GetInstance().Disconnect();
            LoginScreen.Show();
        }

        scrollPosition = GUI.BeginScrollView(scrollViewPosition, scrollPosition, scrollViewInnerPosition);

        float offsetX = roomBoxPosition.x;
        float offsetY = roomBoxPosition.y;

        for (int i = 0; i < ActiveRooms.Count; i++)
        {
            LiveRoomInfoEvent currentRoom = ActiveRooms[i];
            string[]          joinedUsers = currentRoom.getJoinedUsers();
            string            roomId      = currentRoom.getData().getId();
            object            type        = string.Empty;
            object            goal        = string.Empty;
            object            pw          = string.Empty;
            selectedRoomProperties = currentRoom.getProperties();
            selectedRoomProperties.TryGetValue("PW", out pw);
            if (selectedRoomProperties.TryGetValue("TYPE", out type) && selectedRoomProperties.TryGetValue("GOAL", out goal))
            {
                string playersText = string.Empty;

                for (int j = 0; j < 4; j++)
                {
                    if (j == 0 && joinedUsers != null)
                    {
                        playersText = joinedUsers[j];
                    }
                    else if (j == 0)
                    {
                        playersText = "-";
                    }
                    else if (joinedUsers != null && j < joinedUsers.Length)
                    {
                        playersText += "\n" + joinedUsers[j];
                    }
                    else
                    {
                        playersText += "\n-";
                    }
                }

                if (selectedRoomId == roomId)
                {
                    GUI.DrawTexture(new Rect(offsetX, offsetY, roomBoxPosition.width, roomBoxPosition.height), SelectedRoomBoxBackground);
                }
                else if (GUI.Button(new Rect(offsetX, offsetY, roomBoxPosition.width, roomBoxPosition.height), ""))
                {
                    selectedRoomId = roomId;
                    selectedRoomPw = pw == null ? null : pw.ToString();
                }
                GUI.BeginGroup(new Rect(offsetX, offsetY, roomBoxPosition.width, roomBoxPosition.height));
                DrawRoomBox(currentRoom.getData().getName(), type.ToString(), goal.ToString(), playersText, joinedUsers == null ? 0 : joinedUsers.Length, pw == null? null : pw.ToString());
                GUI.EndGroup();
                offsetX += offsetWidth / 2 + roomBoxPosition.width;
                if (i % 2 == 1)
                {
                    offsetY += offsetHeight + roomBoxPosition.height;
                    offsetX  = roomBoxPosition.x;
                }
            }
        }

        GUI.EndScrollView();

        if (GUI.Button(createRoomButtonPos, LanguageManager.getString("CRTROOM")))
        {
            Hide();
            CreateRoomMenu.Show();
        }

        if (!string.IsNullOrEmpty(selectedRoomId) && GUI.Button(joinRoomButtonPos, LanguageManager.getString("JOINROOM")))
        {
            if (selectedRoomPw != null && !string.IsNullOrEmpty(selectedRoomPw.ToString()))
            {
                PasswordEnterMenu.Show(selectedRoomPw.ToString(), selectedRoomId);
                Hide();
            }
            else
            {
                StartCoroutine(JoinRoom(selectedRoomId));
            }
        }

        if (GUI.Button(renewButtonPos, LanguageManager.getString("RENEW")))
        {
            Renew();
        }
    }
예제 #31
0
 public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
 {
     Debug.Log("OnGetLiveRoomInfo " + eventObj.getData().getId());
     WarpClient.GetInstance().JoinRoom(eventObj.getData().getId());
 }
 public void onGetLiveLobbyInfoDone(LiveRoomInfoEvent eventObj)
 {
     //Twist.AppController.showToast ("onGetLiveLobbyInfoDone");
 }
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
     //Twist.AppController.showToast ("onSetCustomRoomDataDone");
 }
 public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
 {
     if (isUserConnected) {
         Debug.Log ("OnGetLiveRoomInfo " + eventObj.getResult () + " " + eventObj.getData ().getId () + " " + eventObj.getJoinedUsers ().Length);
         if (eventObj.getResult () == 0 && eventObj.getJoinedUsers ().Length == 1)
         {
             Debug.Log("Joined room " + eventObj.getData ().getId ());
             roomId = eventObj.getData ().getId ();
             SC_AppWarpKit.JoinToRoom (eventObj.getData ().getId ());
             SC_AppWarpKit.RegisterToRoom (eventObj.getData ().getId ());
         }
         else
         {
             Debug.Log("Still Looking");
             index++;
             if (index < rooms.Count)
                 SC_AppWarpKit.GetLiveRoomInfo (rooms [index]);
             else {
                 Debug.Log ("No More Rooms");
                 SC_AppWarpKit.CreateTurnBaseRoom ("ROOM" + Time.time, userName, 2, null, turnTime);
             }
         }
     }
 }
 public void onUpdatePropertyDone(LiveRoomInfoEvent liveRoomInfoEvent)
 {
     Log ("Result :" + liveRoomInfoEvent.getResult () + "Count :" + liveRoomInfoEvent.getProperties ().Count);
 }
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
     //throw new System.NotImplementedException ();
 }
예제 #37
0
 public void onGetLiveLobbyInfoDone(LiveRoomInfoEvent eventObj)
 {
     //Log ("onGetLiveLobbyInfoDone : " + eventObj.getResult());
 }
 public void onUpdatePropertyDone(LiveRoomInfoEvent lifeLiveRoomInfoEvent)
 {
     if (lifeLiveRoomInfoEvent.getResult() == WarpResponseResultCode.SUCCESS)
     {
         GlobalContext.tableProperties = lifeLiveRoomInfoEvent.getProperties();
     }
 }
예제 #39
0
		public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj){}	
 public void onGetLiveLobbyInfoDone(LiveRoomInfoEvent eventObj)
 {
     if (OnGetLiveLobbyInfoDone != null)
         OnGetLiveLobbyInfoDone(eventObj);
 }
예제 #41
0
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     appWarpResponse+="onGetLiveRoomInfoDone : " + eventObj.getResult()  + ", RoomName : " + eventObj.getData().getName() + ", RoomID : " + eventObj.getData().getId() + ", RoomOwner : " + eventObj.getData().getRoomOwner() + ", MaxUsers : " + eventObj.getData().getMaxUsers()+"\n";
     Debug.Log ("onGetLiveRoomInfoDone : " + eventObj.getResult()  + ", RoomName : " + eventObj.getData().getName() + ", RoomID : " + eventObj.getData().getId() + ", RoomOwner : " + eventObj.getData().getRoomOwner() + ", MaxUsers : " + eventObj.getData().getMaxUsers());
 }
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
     if (OnSetCustomRoomDataDone != null)
         OnSetCustomRoomDataDone(eventObj);
 }
예제 #43
0
    public void onGetLiveLobbyInfoDone(LiveRoomInfoEvent eventObj)
    {
        string result = "";
        if (eventObj.getResult () == WarpResponseResultCode.SUCCESS) {
            string[] users = eventObj.getJoinedUsers();
            for (int i = 0; i < users.Length; i++) {
                result += " " + users [i];
            }
        }
        appWarpResponse+="onJoinLobbyDone : " + eventObj.getResult()  + ", Name : " + eventObj.getData().getName() + ", Id : " + eventObj.getData().getId()+" Users "+result+"\n";

        Debug.Log ("onGetLiveLobbyInfoDone : " + eventObj.getResult()  + ", RoomName : " + eventObj.getData().getName() + ", RoomID : " + eventObj.getData().getId());
    }
예제 #44
0
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     Debug.Log("onGetLiveRoomInfoDone : " + eventObj.getResult());
 }
 //invoke when GetLiveroomInfo is called
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
     if (onGetLiveRoomInfo != null)
             onGetLiveRoomInfo(eventObj);
 }
예제 #46
0
 public void onUpdatePropertyDone(LiveRoomInfoEvent lifeLiveRoomInfoEvent)
 {
     if (lifeLiveRoomInfoEvent.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Dictionary<string, object> d = lifeLiveRoomInfoEvent.getProperties();
         System.Diagnostics.Debug.WriteLine("property successfully updated by you");
     
         
     }
 }
 public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
 {
     if (OnUpdatePropertyDone != null)
         OnUpdatePropertyDone(eventObj);
 }
예제 #48
0
 public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
 {
     Log("OnUpdatePropertyDone :", eventObj.getResult());
 }
예제 #49
0
 public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
 {
 }
예제 #50
0
        public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
        {
            Dictionary<string, object> dict = new Dictionary<string, object>();
            System.Diagnostics.Debug.WriteLine("getliveinfodone");
            
            if (eventObj.getResult() == WarpResponseResultCode.SUCCESS && (eventObj.getJoinedUsers() != null))
            {
                System.Diagnostics.Debug.WriteLine("found room .. reading properties");
            
                for (int i = 0; i < 5; i++)
                {
                    if (eventObj.getProperties().ContainsKey("q" + (i + 1)))
                        Global.ques[i] = eventObj.getProperties()["q" + (i + 1)].ToString();
                }
                if (eventObj.getJoinedUsers().Length == 1)
                {
                    System.Diagnostics.Debug.WriteLine("is player 1");
            
                    Global.PlayerIsFirst = true;
                    Global.warpClient.UpdateRoomProperties(Global.DynRoomId, new Dictionary<string, object>() { { "availUsers", 1 } }, null);
                    System.Diagnostics.Debug.WriteLine("AVAIL  = 1");
            
                }
                else
                {
                    System.Diagnostics.Debug.WriteLine("is player 2\n AVAIL = 2");
            
                    // Global.warpClient.UpdateRoomProperties(eventObj.getData().getId());
                    Global.PlayerIsFirst = false;
                    Global.warpClient.UpdateRoomProperties(Global.DynRoomId, new Dictionary<string, object>() { { "availUsers", 2 } }, null);
                }

                if(flag)
                {
                     for (int zz = 0; zz < 5; zz++)
                     {
                         _page.sel[zz] = Convert.ToInt16(Global.ques[zz]);
                     }
                     System.Diagnostics.Debug.WriteLine("retrieved all questions -  sent to sel - going to g and f");
            
                     _page.g();
                     _page.f();
                     flag = false;
                }
                

                // navigate to game play screen  
                // _page.moveToPlayScreen();
            }
        }
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
     Log ("onSetCustomRoomDataDone : " + eventObj.getResult());
 }
 public void onUpdatePropertyDone(LiveRoomInfoEvent lifeLiveRoomInfoEvent)
 {
 }
예제 #53
0
 public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj)
 {
 }
예제 #54
0
 public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
 {
 }
예제 #55
0
 public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
 {
 }
 public void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj)
 {
 }
예제 #57
0
		public void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj){}
예제 #58
0
 public void onUpdatePropertyDone(LiveRoomInfoEvent eventObj)
 {
     appWarpResponse+=" onUpdatePropertyDone "+eventObj.getResult()+"\n";
 }
예제 #59
0
		public void onUpdatePropertyDone(LiveRoomInfoEvent lifeLiveRoomInfoEvent){}
예제 #60
0
 public void OnGetLiveRoomInfo(LiveRoomInfoEvent eventObj)
 {
     // Debug.Log("OnGetLiveRoomInfo " + eventObj.getResult() + " " + eventObj.getData().getId() + " " + eventObj.getJoinedUsers().Length);
 }