public Setup ( MatchInfoSnapshot _match, JoinRoomDelegate _joinRoomCallback ) : void | ||
_match | MatchInfoSnapshot | |
_joinRoomCallback | JoinRoomDelegate | |
Résultat | void |
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (matchList == null) { status.text = "Couldn't get room list"; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } //Have component sit on gameobject //takes care of setting up name and amount of users roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms at the moment"; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { status.text = ""; if (matches == null) { status.text = "Couldn't get room list."; return; } foreach (MatchInfoSnapshot match in matches) // Note: When Brackeys says MatchDesc, use MatchInfoSnapshot. { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms at the moment."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (success == false) // || matchList == null) { status.text = "Couldn't connect to matchmaking, reason: " + extendedInfo + "."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms at the moment."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (matchList == null) { status.text = "Unable to find rooms."; return; } foreach (MatchInfoSnapshot matchInfo in matchList) { GameObject roomListItemGO = Instantiate(roomListItemPrefab); roomListItemGO.transform.SetParent(roomListParent); RoomListItem listItem = (RoomListItem)roomListItemGO.GetComponent <RoomListItem>(); if (listItem != null) { listItem.Setup(matchInfo, JoinRoom); } roomList.Add(roomListItemGO); } if (roomList.Count == 0) { status.text = "No room available."; } }
private void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { //throw new NotImplementedException(); status.text = ""; if (!success || matchList == null) { status.text = "Couldn't get Room List"; return; } ClearRoomList(); foreach (MatchInfoSnapshot item in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(item, JoinRoom); } //as well as setting up a callback function that will join the game. roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No room at the moment."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { if (matches.Count == 0) { status.text = "No matches found"; return; } ClearRoomList(); foreach (MatchInfoSnapshot match in matches) { //dont need to set position due to scroll view doing it for us GameObject _roomListItemGameObject = Instantiate(roomListItemPrefab); _roomListItemGameObject.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGameObject.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } //component sitting on gameobject that handles name/room size and a callback function for joining roomList.Add(_roomListItemGameObject); } if (roomList.Count == 0) { status.text = "No matches found"; } }
public void OnMatchList(bool sucess, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (matchList == null) { status.text = "couldn't get match list."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGo = Instantiate(roomListItemPrefab); _roomListItemGo.transform.SetParent(roomListParent); _roomListItemGo.transform.localScale = new Vector3(1, 1, 1); RoomListItem _roomListItem = _roomListItemGo.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGo); } if (roomList.Count == 0) { status.text = "No rooms available"; } }
public void OnMatchList(bool success, string info, List <MatchInfoSnapshot> matches) { status.text = ""; if (matches == null) { status.text = "Network Error"; return; } if (matches.Count == 0) { status.text = "No rooms found"; } ClearRoomList(); foreach (var match in matches) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab, roomListParent); RoomListItem roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (roomListItem != null) { roomListItem.Setup(match, JoinRoom); } rooms.Add(_roomListItemGO); } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (!success) { status.text = "Failed to get list."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject roomListItem = Instantiate(roomListItemPrefab); roomListItem.transform.SetParent(roomListParent); RoomListItem rli = roomListItem.GetComponent <RoomListItem>(); if (rli != null) { rli.Setup(match, JoinRoom); } roomList.Add(roomListItem); } if (roomList.Count == 0) { status.text = "No online servers found."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { status.text = ""; if (matches == null) { status.text = "Couldn't get room list"; return; } for (int i = 0; i < matches.Count; i++) { GameObject roomListItemGameObject = Instantiate(roomListItemPrefab) as GameObject; roomListItemGameObject.transform.SetParent(roomListParent); roomList.Add(roomListItemGameObject); RoomListItem roomListItem = roomListItemGameObject.GetComponent <RoomListItem>(); if (roomListItem != null) { roomListItem.Setup(matches[i], JoinRoom); } else { Debug.LogError("RoomListItem component = null"); } } if (roomList.Count == 0) { status.text = "No rooms available"; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (!success || matchList == null) { status.text = "No matches found"; return; } ClearRoomList(); foreach (MatchInfoSnapshot match in matchList) { GameObject _roomlistItemGO = Instantiate(roomListItemPrefab); _roomlistItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomlistItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } //have a components sit on gameobject to take care of settings up the name/amout of users and set callback to join the game roomList.Add(_roomlistItemGO); } if (roomList.Count == 0) { status.text = "No matches currently available"; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (!success || matchList == null) { status.text = "No se pueden obtener salas."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } // as well as setting up a callback function that will join the game. roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No hay partidas en este momento.."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { status.text = ""; if (!success) { status.text = "ERROR: Couldn't get room list."; return; } if (matches.Count == 0) //No matches found { status.text = "No Matches Found."; } foreach (MatchInfoSnapshot match in matches) { GameObject roomListItemGO = Instantiate(roomListItemPrefab); roomListItemGO.transform.SetParent(roomListParent.transform); RoomListItem roomItem = roomListItemGO.GetComponent <RoomListItem>(); if (roomItem != null) { roomItem.Setup(match, JoinRoom); } roomList.Add(roomListItemGO); } }
private void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (matchList == null) { status.text = "no list retreived"; return; } ClearRoomList(); foreach (MatchInfoSnapshot match in matchList) { GameObject roomListItemGO = Instantiate(roomListItemPrefab); roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } // as well as setting up a callback function that will join the game. roomList.Add(roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms at the moment."; } }
private void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> responseData) { status.text = ""; if (responseData == null || !success) { status.text = "Couldn't get room list."; return; } ClearRoomList(); foreach (MatchInfoSnapshot matchInfo in responseData) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(matchInfo, JoinRoom); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No Games Found"; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { status.text = ""; if (roomList == null) { status.text = "Couldn't get room list"; return; } foreach (MatchInfoSnapshot item in matches) { GameObject roomListItemGO = Instantiate(roomListItemPrefab); roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(item, JoinRoom); } roomList.Add(roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms at the moment"; } }
private void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> responseData) { status.text = ""; if (!success || responseData == null) { status.text = "Couldn`t get matches"; return; } foreach (MatchInfoSnapshot match in responseData) { GameObject _roomListItemGameObject = Instantiate(roomListItemPrefab); _roomListItemGameObject.transform.SetParent(roomListParent); RoomListItem roomListItem = _roomListItemGameObject.GetComponent <RoomListItem>(); if (roomListItem != null) { roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGameObject); } if (roomList.Count == 0) { status.text = "No rooms at the moment"; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { status.text = ""; if (!success || matches == null) { status.text = "Couldn't get room list."; return; } for (int i = 0; i < matches.Count; i++) { GameObject roomListItemGO = Instantiate(roomListItemPrefab); roomListItemGO.transform.SetParent(roomListParent); // 룸 리스트 아이템에 셋업 RoomListItem roomListItem = roomListItemGO.GetComponent <RoomListItem>(); if (roomListItem != null) { roomListItem.Setup(matches[i], JoinRoom); } //룸 리스트에 아이템 추가 roomList.Add(roomListItemGO); } if (roomList.Count == 0) { status.text = "No room at the moment."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { Debug.Log("OnMatchList"); textWarning.text = ""; if (!success || matchList == null) { textWarning.text = "Couldn't get room list."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, ReadyToSelectCharacter); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { textWarning.text = "No rooms at the moment."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (matchList == null) { status.text = "Couldn't get room list."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } // that will take care of setting up the name/amount of users // as well as setting up a callback function that will join the game. roomList.Add(_roomListItemGO); } // if we have no rooms to join we give a new text value if (roomList.Count == 0) { status.text = "No rooms at the moment.."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (matchList == null) { status.text = "coulnd't get room list."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(RoomListItemPrefab); _roomListItemGO.transform.SetParent(RoomListParent); //_roomListItem is an script that i added in the _roomListItemGO prefab and that deals with writing the name of the room and the current players. RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } //Setting up a callback function that will be called from the _roomListItemGO._roomListItem script joinGame. roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms available at the moment"; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { base.OnMatchList(success, extendedInfo, matchList); status.text = ""; if (matchList == null) { status.text = "Could not get matches."; return; } ClearRoomList(); for (int m = 0; m < matchList.Count; m++) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(matchList[m], JoinRoom); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No matches found."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { status.text = ""; //deletes the text in status.text if (!success || matches == null) { status.text = "Couldn't get room list."; return; } foreach (MatchInfoSnapshot match in matches)//Loop to add new elements based on descriptions found in "matches" { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); //Parent it to the room list parent RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); //Space to have a component sit on the gameobject that will take care of setting up the name/amount of users //as well as setting up a callback function that will join the game. if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms at the moment."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (!success || matchList == null) { status.text = "Couldn't get room list."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject roomListItemGo = Instantiate(roomListItemPrefab); roomListItemGo.transform.SetParent(roomListParent); RoomListItem roomListItem = roomListItemGo.GetComponent <RoomListItem>(); if (roomListItem != null) { roomListItem.Setup(match, JoinRoom); } // as well as setting up a callback function that will join the game. roomList.Add(roomListItemGo); } if (roomList.Count == 0) { status.text = "No room at the moment"; } }
public void OnMatchList(ListMatchResponse matchList) { status.text = ""; if (matchList == null) { status.text = "No rooms found"; return; } foreach (MatchDesc match in matchList.matches) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "0 rooms"; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matches) { status.text = ""; if (!success) { status.text = "Couldn't get room list."; return; } ClearRoomList(); foreach (MatchInfoSnapshot match in matches) { GameObject _roomListItemGameObject = Instantiate <GameObject>(roomListItemPrefab); _roomListItemGameObject.transform.SetParent(roomListParent); // component to set up name/userCount + join game callback function. RoomListItem _roomListItem = _roomListItemGameObject.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGameObject); } if (roomList.Count == 0) { status.text = "No rooms available."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (!success || matchList == null) { status.text = "Couldn't get room list"; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject roomListItemGO = Instantiate(roomListItemPrefab); roomListItemGO.transform.SetParent(roomListParent); RoomListItem _roomListItem = roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } //Have a component sit on the gameobject that will take care //of setting up the name and amount of users as well as setting //up a callback function that will join the game roomList.Add(roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms at the moment :("; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (!success || matchList == null) { status.text = "Couldn't get matches.."; return; } // MatchDesc has been renamed to MatchInfoSnapshot. foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent); // have a component on gameobject that will take care of setting up a name/amount of users. RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } // as well as setting up callback function that will join a game roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "no rooms available..."; } }
public void OnMatchList(bool success, string extendedInfo, List <MatchInfoSnapshot> matchList) { status.text = ""; if (!success || matchList == null) { status.text = "Couldn't get room list."; return; } foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGO = Instantiate(roomListItemPrefab); _roomListItemGO.transform.SetParent(roomListParent, false); RoomListItem _roomListItem = _roomListItemGO.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGO); } if (roomList.Count == 0) { status.text = "No rooms found."; } }
public void OnMatchList(bool success, string extendInfo, List <MatchInfoSnapshot> matchList) { if (!success) { status.text = "Error Loading Room List : \n" + extendInfo; return; } if (matchList.Count == 0) { status.text = "No Rooms Found"; return; } status.text = ""; foreach (MatchInfoSnapshot match in matchList) { GameObject _roomListItemGeo = Instantiate(roomListItemPrefab); _roomListItemGeo.transform.SetParent(roomListParent); RoomListItem _roomListItem = _roomListItemGeo.GetComponent <RoomListItem>(); if (_roomListItem != null) { _roomListItem.Setup(match, JoinRoom); } roomList.Add(_roomListItemGeo); } }