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); }
public K AddUiComponent <K, P1>(P1 p1) where K : UIBaseComponent, new() { UiComponent = this.AddComponent <K, P1>(p1); return((K)UiComponent); }
public UIBaseComponent AddUiComponent(Type type) { UiComponent = (UIBaseComponent)this.AddComponent(type); return(UiComponent); }
/// <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); }
public void AddUIBaseComponent <T>() where T : UIBaseComponent, new() { T t = this.AddComponent <T>(); this.UiBaseComponent = t; }