/// <summary> /// Invoked, when one of the properties changes in the server. /// (this is usually called on a client) /// </summary> /// <param name="key"></param> /// <param name="value"></param> public virtual void OnPropertyChange(string key, string value) { var propView = Properties.FindObject <LobbyPropController>(view => view.RawData.PropertyKey == key); if (propView == null) { return; } propView.UpdateValue(value); }
private void UpdateGameJoinButton() { GamesListUiItem item = GetSelectedItem(); if (item == null && string.IsNullOrEmpty(selectedID) == false) { item = _items.FindObject <GamesListUiItem> ((x) => { return(x.GameId == selectedID); }); if (item != null) { Select(item); } else { selectedID = ""; GameJoinButton.interactable = false; } } else { GameJoinButton.interactable = GetSelectedItem() != null; } }
public GamesListUiItem GetSelectedItem() { return(_items.FindObject <GamesListUiItem>(item => item.IsSelected)); }