Exemplo n.º 1
0
    public void InitPartnerList(int test)
    {
        RoleInfo role_info = LobbyClient.Instance.CurrentRole;

        if (role_info != null)
        {
            PartnerStateInfo state_info = role_info.PartnerStateInfo;
            if (state_info == null)
            {
                return;
            }
            int active_id = state_info.GetActivePartnerId();
            List <PartnerInfo> partnerList = state_info.GetAllPartners();
            if (partnerList != null)
            {
                for (int index = 0; index < partnerList.Count; ++index)
                {
                    //AddExitPartnerItem(partnerList[index],active_id);
                }

                int            firstPartnerId = PartnerReposition(active_id);
                UIPartnerPanel partnerPanel   = NGUITools.FindInParents <UIPartnerPanel>(this.gameObject);
                if (partnerPanel != null)
                {
                    partnerPanel.SetPartnerInfo(firstPartnerId);
                }
            }
        }
    }
Exemplo n.º 2
0
    //
    public void UpdatePartnerInfo(PartnerInfo info)
    {
        if (info == null)
        {
            return;
        }
        UIPartnerItem partner_item = GetPartnerItemById(info.Id);

        if (partner_item != null)
        {
            partner_item.UpdatePartnerInfo(info);
        }
        RoleInfo role_info = LobbyClient.Instance.CurrentRole;

        if (role_info != null)
        {
            PartnerStateInfo state_info = role_info.PartnerStateInfo;
            if (state_info == null)
            {
                return;
            }
            int active_id = state_info.GetActivePartnerId();
            PartnerReposition(active_id);
        }
    }
Exemplo n.º 3
0
 void OnEnable()
 {
     try
     {
         RoleInfo role_info = LobbyClient.Instance.CurrentRole;
         if (role_info != null)
         {
             PartnerStateInfo state_info = role_info.PartnerStateInfo;
             if (state_info == null)
             {
                 return;
             }
             int active_id = state_info.GetActivePartnerId();
             PartnerReposition(active_id);
         }
     }
     catch (System.Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogErrorFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }