// Use this for initialization void Start() { m_buttonMakeTeam.onClick.AddListener(delegate() { LoginControler.Instance().MakeTeam(); }); m_buttonTeamStart.onClick.AddListener(delegate() { LoginControler.Instance().TeamStart(); }); m_buttonOnlinePlayers.onClick.AddListener(delegate() { LoginControler.Instance().OnlinePlayers(); }); m_buttonLeave.onClick.AddListener(delegate() { LoginControler.Instance().LeaveTeam(); }); m_textName.gameObject.SetActive(true); m_textName.text = PlayerData.Instance().proName; m_imgHead.gameObject.SetActive(true); m_imgHead.texture = PlayerData.Instance().proHeadTex; m_textID.text = "ID:" + PlayerData.Instance().proPlayerId.ToString(); }
void SlotClick() { if (m_qwPlayerId != 0) { return; } LobbyTeamPlayer pLeader = TeamPlayerManager.Instance().GetPlayerBySlot(0); if (pLeader.m_qwPlayerId != PlayerData.Instance().proPlayerId) { //其他人点就是换位置 后面可以加个其他模式 LoginControler.Instance().ChangeSlot(m_dwSlotId); } else { //队长点 就是拉人 LoginControler.Instance().OnlinePlayers(); } }