Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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));
        }
Beispiel #4
0
 protected AChannel(AService service, ChannelType channelType)
 {
     this.Id          = IdGenerater.GenerateId();
     this.ChannelType = channelType;
     this.Service     = service;
 }