/// Invoked when a response from GetRoomWithNUser and GetRoomWithProperties 
 /// <param name="matchedRoomsEvent"></param>
 public void onGetMatchedRoomsDone(MatchedRoomsEvent matchedRoomsEvent)
 {
     if (matchedRoomsEvent.getResult() == WarpResponseResultCode.SUCCESS)
     {
         /* Deployment.Current.Dispatcher.BeginInvoke(() =>
          {
              MessageBox.Show(matchedRoomsEvent.getRoomsData);
          });*/
     }
 }
 public void onGetMatchedRoomsDone(MatchedRoomsEvent eventObj)
 {
     if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
     {
         Log ("GetMatchedRooms event received with success status");
         foreach (var roomData in eventObj.getRoomsData())
         {
             Log("Room ID:" + roomData.getId());
         }
     }
 }
 //invoke when GetRoomInRange is called
 public void onGetMatchedRoomsDone(MatchedRoomsEvent eventObj)
 {
     if (OnMatchedRooms != null)
         OnMatchedRooms(eventObj);
 }
 public void onGetMatchedRoomsDone(MatchedRoomsEvent matchedRoomsEvent)
 {
     throw new System.NotImplementedException ();
 }
Ejemplo n.º 5
0
    public void OnGetMatchedRoomsDone(MatchedRoomsEvent eventObj)
    {
        Debug.Log("OnGetMatchedRoomsDone : " + eventObj.getResult());
        rooms = new List<string>();
        foreach (var roomData in eventObj.getRoomsData())
        {
            Debug.Log("Room ID:" + roomData.getId() + ", " + roomData.getRoomOwner());
            guiText.text += "Room ID:" + roomData.getId() + ", " + roomData.getRoomOwner() + System.Environment.NewLine;
            rooms.Add(roomData.getId()); // add to the list of rooms id
        }

        Debug.Log("Rooms Amount: " + rooms.Count);
        if(rooms.Count > 0)
        {
            roomId = rooms[0];
            SC_AppWarpKit.JoinToRoom (rooms[0]);
        }
    }
    public void OnGetMatchedRoomsDone(MatchedRoomsEvent eventObj)
    {
        Debug.Log("OnGetMatchedRoomsDone : " + eventObj.getResult());
        if (isUserConnected) {
            rooms = new List<string> ();

            foreach (var roomData in eventObj.getRoomsData()) {
                Debug.Log ("Room ID:" + roomData.getId () + ", " + roomData.getRoomOwner ());
                rooms.Add (roomData.getId ()); // add to the list of rooms id
            }

            index = 0;
            if (index < rooms.Count) {
                SC_AppWarpKit.GetLiveRoomInfo (rooms [index]);
            } else {
                Debug.Log ("No Rooms");
                SC_AppWarpKit.CreateTurnBaseRoom ("ROOM" + Time.time, userName, 2, null, turnTime);
            }
        }
    }
Ejemplo n.º 7
0
 public void onGetMatchedRoomsDone(MatchedRoomsEvent matchedRoomsEvent)
 {
     Debug.Log ("onGetMatchedRoomsDone : " + matchedRoomsEvent.getResult());
     appWarpResponse+="onGetMatchedRoomsDone : " + matchedRoomsEvent.getResult()+"\n";
 }
Ejemplo n.º 8
0
    public void OnGetMatchedRoomsDone(MatchedRoomsEvent eventObj)
    {
        Debug.Log("OnGetMatchedRoomsDone : " + eventObj.getResult());
        rooms = new List<string>();
        foreach (var roomData in eventObj.getRoomsData())
        {
            rooms.Add(roomData.getId()); // add to the list of rooms id
        }

        Debug.Log("Number of rooms found: " + rooms.Count);

        if (rooms.Count > 0)
        {
            roomId = rooms[0];
            //false = created room
            //true  = joined room
            created_or_joined = true;
            SC_AppWarpKit.JoinToRoom(rooms[0]); //rooms[0] is the last created room in the list
        }
        else
        {
            Debug.Log("no room exists - need to create");
            SC_AppWarpKit.CreateTurnBaseRoom("BattleShips" + UnityEngine.Random.Range(0, 1000), userName, 2, null, 60);
        }
    }