| using System.Collections; | 
| using System.Collections.Generic; | 
| using UnityEngine; | 
| using UnityEngine.UI; | 
|   | 
| /// <summary> | 
| /// 公会捐赠界面 | 
| /// </summary> | 
| public class GuildDonateWin : UIBase | 
| { | 
|     [SerializeField] GuildDonateCell[] donateCells; | 
|     [SerializeField] Button detailBtn; | 
|   | 
|   | 
|   | 
|     protected override void InitComponent() | 
|     { | 
|         detailBtn.AddListener(() => | 
|         { | 
|             // UIManager.Instance.OpenWindow<GuildDonateDetailWin>(); | 
|         }); | 
|     } | 
|   | 
|     protected override void OnPreOpen() | 
|     { | 
|         GuildManager.Instance.DonateCntListEvent += DonateCntListEvent; | 
|         Display(); | 
|     } | 
|   | 
|     protected override void OnPreClose() | 
|     { | 
|         GuildManager.Instance.DonateCntListEvent -= DonateCntListEvent; | 
|     } | 
|   | 
|     void Display() | 
|     { | 
|         for (int i = 0; i < donateCells.Length; i++) | 
|         { | 
|             donateCells[i].Display(); | 
|         } | 
|     } | 
|   | 
|     void DonateCntListEvent() | 
|     { | 
|         Display(); | 
|     } | 
|   | 
| } |