public void RefreshTeamGrid(int _teamId) //刷新队伍列表 { if (!isActiveAndEnabled || _teamId != PlayerNetwork.mainPlayer.TeamId) { return; } _MemberLis.Clear(); TeamData td = GroupNetwork.GetTeamInfo(_teamId); if (null != td) { foreach (PlayerNetwork pnet in td.Members) { _MemberLis.Add(pnet); } } GroupNetwork.GetJoinRequest(_MemberLis); CreatTroops(TroopsPageIndex, _MemberLis); }
public void SetInfo(string _name, int _kill, int _death, float _score, PlayerNetwork _pnet)//Troops { if (-1 == PlayerNetwork.mainPlayer.TeamId || null == _pnet) { return; } SetActive(true); if (m_name != null) { m_name.text = _name; } if (m_killAndDeath != null) { m_killAndDeath.text = _kill.ToString() + "/" + _death.ToString(); } if (m_score != null) { m_score.text = _score.ToString(); } //if (m_captainSpr != null) // m_captainSpr.enabled = _iscaptain; //if (m_AgreeSpr != null) // m_AgreeSpr.enabled = _request; //if (m_DisAgreeSpr != null) // m_DisAgreeSpr.enabled = _request; TeamData td = GroupNetwork.GetTeamInfo(PlayerNetwork.mainPlayer.TeamId); mPnet = _pnet; //队长的判断 if (_pnet.Id == td.LeaderId) { if (m_captainSpr != null) { m_captainSpr.enabled = true; } } else if (_pnet.Id != td.LeaderId) { if (m_captainSpr != null) { m_captainSpr.enabled = false; } } //是不是申请人的判断 if (PlayerNetwork.mainPlayer.Id == td.LeaderId && GroupNetwork.IsJoinRequest(_pnet)) { if (m_AgreeSpr != null) { m_AgreeSpr.gameObject.SetActive(true); } if (m_DisAgreeSpr != null) { m_DisAgreeSpr.gameObject.SetActive(true); } } else { if (m_AgreeSpr != null) { m_AgreeSpr.gameObject.SetActive(false); } if (m_DisAgreeSpr != null) { m_DisAgreeSpr.gameObject.SetActive(false); } } }