예제 #1
0
 /// <summary>
 /// 重构Close函数,先关闭子UI和原型再关闭本体
 /// </summary>
 public override void Close()
 {
     GroupUIList.ForEach((T SubUI) => SubUI.Close());
     GroupUIList.Clear();
     PrototypeUI.Close();
     base.Close();
 }
예제 #2
0
 /// <summary>
 /// 从参数的第一项开始,是新的
 /// </summary>
 /// <param name="CardNames"></param>
 public void Refresh(string[] CardNames)
 {
     GroupUIList.ForEach((PCardUI SubUI) => {
         SubUI.Close();
         Object.Destroy(SubUI.UIBackgroundImage.gameObject);
     });
     GroupUIList.Clear();
     for (int i = 0; i < CardNames.Length - 1; ++i)
     {
         AddSubUI().Initialize(CardNames[i + 1], PrototypeUI.UIBackgroundImage.localPosition, i + StartIndex, CardNames.Length - 1).Open();
     }
 }