Example #1
0
        public void AddUIBaseComponent <T>() where T : UIBaseComponent, new()
        {
            T t = this.AddComponent <T>();

            this.UiBaseComponent = t;
        }
Example #2
0
 public K AddUiComponent <K, P1>(P1 p1) where K : UIBaseComponent, new()
 {
     UiComponent = this.AddComponent <K, P1>(p1);
     return((K)UiComponent);
 }
Example #3
0
 public K AddUiComponent <K, P1, P2, P3>(P1 p1, P2 p2, P3 p3) where K : UIBaseComponent, new()
 {
     UiComponent = this.AddComponent <K, P1, P2, P3>(p1, p2, p3);
     return((K)UiComponent);
 }
Example #4
0
 /// <summary>
 /// 添加主UI组件,继承自UIBaseComponent
 /// </summary>
 /// <typeparam name="K"></typeparam>
 /// <returns></returns>
 public K AddUiComponent <K>() where K : UIBaseComponent, new()
 {
     UiComponent = this.AddComponent <K>();
     return((K)UiComponent);
 }