예제 #1
0
 private void SwitchAddButton(bool showAddButton, SquadInfoUINode squadInfo, InviteFriendsPopupComponent popup)
 {
     squadInfo.squadInfoUI.SwitchAddButton(showAddButton);
     if (!showAddButton)
     {
         popup.Close();
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 public void RemoveTeammateIcon(NodeRemoveEvent e, UserInSquadNode teammate, [JoinAll] SquadInfoUINode squadInfo)
 {
     squadInfo.squadInfoUI.RemoveTeammate(teammate.Entity.Id);
 }