private void SwitchAddButton(bool showAddButton, SquadInfoUINode squadInfo, InviteFriendsPopupComponent popup) { squadInfo.squadInfoUI.SwitchAddButton(showAddButton); if (!showAddButton) { popup.Close(); } }
public void TeammateRemoved(NodeRemoveEvent e, UserInSquadNode teammate, [JoinBySquad] SquadNode squad, [JoinBySquad] ICollection <UserInSquadNode> allTeammates, [JoinAll] SquadInfoUINode squadInfo, [JoinAll] SingleNode <InviteFriendsPopupComponent> inviteFriendsPopup) { bool showAddButton = new HashSet <UserInSquadNode>(allTeammates).Count <= (squad.squadConfig.MaxSquadSize - 1); this.SwitchAddButton(showAddButton, squadInfo, inviteFriendsPopup.component); }
public void AddTeammateIcon(NodeAddedEvent e, SquadInfoUINode squadInfo, [Combine] UserInSquadNode teammate, [JoinBySquad, Context] SquadNode squad) { LeagueConfigComponent leagueConfig = base.Select <LeagueNode>(teammate.Entity, typeof(LeagueGroupComponent)).First <LeagueNode>().leagueConfig; squadInfo.squadInfoUI.AddTeammate(teammate.Entity.Id, teammate.userAvatar.Id, leagueConfig.LeagueIndex); }
public void RemoveTeammateIcon(NodeRemoveEvent e, UserInSquadNode teammate, [JoinAll] SquadInfoUINode squadInfo) { squadInfo.squadInfoUI.RemoveTeammate(teammate.Entity.Id); }