void OnShowRelationNamePopWindow(bool bSuccess, object param)
 {
     if (bSuccess)
     {
         RelationNamePopController.Instance().SetDelegate(OnChooseFriend);
         RelationNamePopController.Instance().SetIsPopWindow(false);
         RelationNamePopController.Instance().SetIsRestaurantFriend(true);
     }
 }
 public void SetData(RelationNamePopController parentWindow, Relation relationData)
 {
     m_parentWindow = parentWindow;
     labelName.text = relationData.Name;
     m_Guid         = relationData.Guid;
     m_VisitSprite.SetActive(false);
     if (restaurantLevel != null)
     {
         restaurantLevel.text = relationData.Level.ToString();
     }
     if (restauranIcon != null)
     {
         restauranIcon.spriteName = Utils.GetHeadPicByProfession(relationData.Profession);
     }
 }
Beispiel #3
0
 void OnChooseReceiver(bool bSuccess, object param)
 {
     RelationNamePopController.Instance().SetDelegate(SetReceiver);
 }
    public static RelationNameListItem CreateItem(GameObject grid, GameObject resItem, string name, RelationNamePopController parentWindow, Relation relationData)
    {
        GameObject curItem = Utils.BindObjToParent(resItem, grid);

        if (null == curItem)
        {
            LogModule.ErrorLog("CreateItem, curItem error!");
        }
        curItem.name = name;
        RelationNameListItem curItemComponent = curItem.GetComponent <RelationNameListItem>();

        if (null == curItemComponent)
        {
            LogModule.ErrorLog("relation list item error!");
            ResourceManager.DestroyResource(ref curItem);
            return(null);
        }

        curItemComponent.SetData(parentWindow, relationData);
        return(curItemComponent);
    }