private void _UpdateLobbyType1(DataLobby lobby) { LobbyRowType1 lobbyRow = types1.Find(lb => lb.data.roomId == lobby.roomId); if (lobbyRow != null) { lobbyRow.setData(lobby); } }
public static LobbyRowType1 Create(DataLobby data, UITable parent, Action <DataLobby> callBack) { GameObject go = GameObject.Instantiate(Resources.Load("Prefabs/Lobby/LobbyRowType1")) as GameObject; go.transform.parent = parent.transform; go.transform.localPosition = Vector3.zero; go.transform.localScale = Vector3.one; go.GetComponent <UIDragScrollView>().scrollView = parent.GetComponentInParent <UIScrollView>(); go.name = "#" + data.roomId; LobbyRowType1 item = go.GetComponent <LobbyRowType1>(); item.setData(data); item.action = callBack; return(item); }