public static T CreateWithParent <T, A>(Entity parent, A a) where T : Entity { Type type = typeof(T); T component = (T)Entity.Create(type, true); component.Id = IdGenerater.GenerateId(); component.Parent = parent; EventSystem.Instance.Awake(component, a); return(component); }
public static T CreateWithParent <T, A, B, C, D>(Entity parent, A a, B b, C c, D d, bool fromPool = true) where T : Entity { Type type = typeof(T); T component = (T)Entity.Create(type, true); component.Id = IdGenerater.GenerateId(); component.Parent = parent; EventSystem.Instance.Awake(component, a, b, c, d); return(component); }
public static async ETTask <Scene> Create(Entity parent, string name, SceneType sceneType) { long id = IdGenerater.GenerateId(); return(await Create(parent, id, parent.DomainZone(), name, sceneType)); }
protected AChannel(AService service, ChannelType channelType) { this.Id = IdGenerater.GenerateId(); this.ChannelType = channelType; this.Service = service; }