protected override void Awake() { base.Awake(); model = GetComponentInParent <TeammateModel>(); TeammateController.TeammateSelected += OnTeammateSelected; IsVisible = false; }
private void OnTeammateSelected(TeammateModel teammate) { IsVisible = model == teammate; }
public void SelectTeammate(TeammateModel teammate) { currentTeammate = teammate; TeammateSelected?.Invoke(currentTeammate); }