public void onGetMatchedRoomsDone(MatchedRoomsEvent eventObj) { Log("onGetMatchedRooms: ", eventObj.getResult()); if (eventObj.getResult() == 0) { RoomData[] rooms = eventObj.getRoomsData(); ; foreach (RoomData room in rooms) { if (room.getName() == Master.getInstance().roomName) { AppWarp.roomID = room.getId(); break; } } if (AppWarp.roomID != null) { WarpClient.GetInstance().JoinRoom(AppWarp.roomID); Log(AppWarp.roomID); } else { WarpClient.GetInstance().CreateRoom(Master.getInstance().roomName, Master.getInstance().username, 2, null); } } }
public void onGetMatchedRoomsDone(MatchedRoomsEvent eventObj) { Log("onGetMatchedRooms: ", eventObj.getResult()); if ((ResultCode)eventObj.getResult() == ResultCode.SUCCESS) { string matchedRoomID = null; RoomData[] rooms = eventObj.getRoomsData(); foreach (RoomData room in rooms) { Log(room.getName() + " vs. " + roomNameFilter); if (room.getName() == (roomNameFilter)) { Log("Found appropriate room"); matchedRoomID = room.getId(); break; } } if (string.IsNullOrEmpty(matchedRoomID)) { Log("No appropriate room found"); if (roomFoundEvent != null) { roomFoundEvent(null); } } else { currentRoom_ID = matchedRoomID; WarpClient.GetInstance().GetLiveRoomInfo(matchedRoomID); } } }
/// 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) { //Twist.AppController.showToast ("onGetMatchedRoomsDone"); if (eventObj.getResult() == WarpResponseResultCode.SUCCESS) { foreach (var roomData in eventObj.getRoomsData()) { } } }
/// 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()); } } }
public void onGetMatchedRoomsDone(MatchedRoomsEvent eventObj) { if (eventObj.getResult() == WarpResponseResultCode.SUCCESS && OnRoomsInRange != null) { OnRoomsInRange(true, eventObj); } else if (OnRoomsInRange != null) { OnRoomsInRange(false, null); } }
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()); } } }
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); } } }
public void onGetMatchedRoomsDone(MatchedRoomsEvent matchedRoomsEvent) { Debug.Log ("onGetMatchedRoomsDone : " + matchedRoomsEvent.getResult()); appWarpResponse+="onGetMatchedRoomsDone : " + matchedRoomsEvent.getResult()+"\n"; }
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); } }