Exemple #1
0
    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;
        })
                       );
    }
Exemple #2
0
 // 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);
 }
Exemple #3
0
 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;
         })
                        );
     }
 }
Exemple #4
0
 public void SetRoleDate(UInt64 qwPlayerId, GameProto.RoleData pRoleData)
 {
     m_mapPlayers[qwPlayerId] = pRoleData;
 }