yyl
4 天以前 5a4e34c8a85737c0fa5b5775122da31155cbaef3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
 
 
public class GuildApplyListCell : MonoBehaviour
{
    [SerializeField] AvatarCell avatarCell;
    [SerializeField] OfficialTitleCell officialTitleCell;
    [SerializeField] TextEx nameText;
    [SerializeField] TextEx lvText;
    [SerializeField] TextEx fightPointText;
    [SerializeField] ButtonEx yesButton;
    [SerializeField] ButtonEx noButton;
    GuildManager manager { get { return GuildManager.Instance; } }
    public void Display(int index, List<FairyApply> list)
    {
        if (list.IsNullOrEmpty() || index >= list.Count || index < 0)
            return;
        FairyApply data = list[index];
        nameText.text = data.Name;
        lvText.text = data.LV.ToString();
        fightPointText.text = UIHelper.ReplaceLargeArtNum(data.FightPower);
        avatarCell.InitUI(AvatarHelper.GetAvatarModel(data.PlayerID, data.Face, data.FacePic));
        officialTitleCell.InitUI(data.RealmLV, data.TitleID);
 
        yesButton.SetListener(() =>
        {
            manager.SendJoinFamilyReply(data.PlayerID, true);
        });
        noButton.SetListener(() =>
        {
            manager.SendJoinFamilyReply(data.PlayerID, false);
        });
    }
 
}