// *********************************************************************** // Assembly : Game // Author : Kimch // Created : 2021-04-12 // Description : // Last Modified By : // Last Modified On : // *********************************************************************** // // // *********************************************************************** using UnityEngine; using UnityEngine.UI; namespace G.UI { /// /// /// public class BeautyListPanel : KUIWidget { #region Field #pragma warning disable CS0649 // 从未对字段赋值,字段将一直保持其默认值 null [KUIFlag] KUIList __listBeauties; #pragma warning restore CS0649 // 从未对字段赋值,字段将一直保持其默认值 null #endregion #region Method public override void Refresh() { ShowPage(0, true); } private void ShowPage(int index, bool force = false) { var beauties = BeautyProxy.Instance.GetBeauties(); if (beauties != null) { __listBeauties.Clear(); for (int i = 0; i < beauties.Length; i++) { __listBeauties.GetItem().SetData(beauties[i]); } } } #endregion #region Unity /// /// /// private void Awake() { SetViewData(); __listBeauties.AddTemplate(); } private void OnEnable() { Refresh(); } #endregion } }