public void Init(GameProto.RoleData oData) { m_imgHead.gameObject.SetActive(true); LobbyTeamPlayer pLeader = TeamPlayerManager.Instance().GetPlayerBySlot(0); if (pLeader.m_qwPlayerId != PlayerData.Instance().proPlayerId) { m_buttonKick.gameObject.SetActive(false); } else { if (m_dwSlotId != 0) { m_buttonKick.gameObject.SetActive(false); //todo 先不踢玩家 如果要加这个功能 后面再处理 m_buttonKick.gameObject.SetActive(true); } else { m_buttonKick.gameObject.SetActive(false); } } m_qwPlayerId = oData.QwPlayerId; m_textName.text = oData.SzNickName; m_buttonInvite.gameObject.SetActive(false); StartCoroutine(H5Helper.SendGet(oData.SzAvatar, delegate(Texture2D tex) { m_imgHead.texture = tex; }) ); }
// Use this for initialization void Start() { GameProto.RoleData pData = GameData.Instance().GetRoleData(GameData.Instance().GetSlotPlayer(m_dwSlotId)); if (pData == null) { return; } SetPlayerId(pData.QwPlayerId); SetName(pData.SzNickName); SetHeadImage(pData.SzAvatar); SetSex(pData.DwSex); }
public void PrepareInit(GameProto.RoleData oData) { if (oData == null) { m_qwPlayerId = 0; m_textName.gameObject.SetActive(false); m_buttonInvite.gameObject.SetActive(false); m_buttonKick.gameObject.SetActive(false); m_imgHead.gameObject.SetActive(false); } else { m_imgHead.gameObject.SetActive(true); m_buttonKick.gameObject.SetActive(false); m_qwPlayerId = oData.QwPlayerId; m_textName.text = oData.SzNickName; m_buttonInvite.gameObject.SetActive(false); StartCoroutine(H5Helper.SendGet(oData.SzAvatar, delegate(Texture2D tex) { m_imgHead.texture = tex; }) ); } }
public void SetRoleDate(UInt64 qwPlayerId, GameProto.RoleData pRoleData) { m_mapPlayers[qwPlayerId] = pRoleData; }