public void Refresh() { _player = GameSettings.Instance.players[PlayerIndex]; PlayerName.text = _player.Name; var colorBlock = PlayerColor.colors; colorBlock.normalColor = _player.Color; colorBlock.highlightedColor = _player.Color; PlayerColor.colors = colorBlock; PlayerBrain.GetComponentInChildren <UnityEngine.UI.Text>().text = (_player.Brain != null) ? _player.Brain.name : "None"; }
public PlayerState this[GameSettings.PlayerInfo playerInfo] { get { return(players.FirstOrDefault(p => p.PlayerInfo == playerInfo)); } }