Пример #1
0
        public static T CreateWithId <T, A, B>(Entity domain, long id, A a, B b) where T : Entity
        {
            Type type      = typeof(T);
            T    component = (T)Entity.Create(type, true);

            component.Domain = domain;
            component.Id     = id;
            RunSystem.Awake(component, a, b);
            return(component);
        }
Пример #2
0
        public static Entity CreateWithParent(Type type, Entity parent)
        {
            Entity component = Entity.Create(type, true);

            component.Id     = Utility.IdGenerater.GenerateId();
            component.Parent = parent;

            RunSystem.Awake(component);
            return(component);
        }
Пример #3
0
        public static T Create <T, A, B, C>(Entity domain, A a, B b, C c) where T : Entity
        {
            Type type      = typeof(T);
            T    component = (T)Entity.Create(type, true);

            component.Domain = domain;
            component.Id     = Utility.IdGenerater.GenerateId();
            RunSystem.Awake(component, a, b, c);
            return(component);
        }
Пример #4
0
        public static T Create <T, A>(A a) where T : Entity
        {
            Type type      = typeof(T);
            T    component = (T)Entity.Create(type, true);

            component.Domain = null;
            component.Id     = Utility.IdGenerater.GenerateId();
            RunSystem.Awake(component, a);
            return(component);
        }
Пример #5
0
        public static Entity Create(Entity domain, Type type)
        {
            Entity component = Entity.Create(type, true);

            component.Domain = domain;
            component.Id     = Utility.IdGenerater.GenerateId();

            RunSystem.Awake(component);
            return(component);
        }
Пример #6
0
        private T CreateWithComponentParent <T, A, B, C>(A a, B b, C c, bool isFromPool = true) where T : Entity
        {
            Type   type      = typeof(T);
            Entity component = Create(type, isFromPool);

            component.Id = this.Id;
            component.ComponentParent = this;

            RunSystem.Awake(component, a, b, c);
            return((T)component);
        }
Пример #7
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     = Utility.IdGenerater.GenerateId();
            component.Parent = parent;

            RunSystem.Awake(component, a, b, c, d);
            return(component);
        }
Пример #8
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     = Utility.IdGenerater.GenerateId();
            component.Parent = parent;

            RunSystem.Awake(component, a);
            return(component);
        }
Пример #9
0
        public static T CreateWithParentAndId <T, A, B, C, D>(Entity parent, long id, 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     = id;
            component.Parent = parent;

            RunSystem.Awake(component, a, b, c, d);
            return(component);
        }
Пример #10
0
        public static T CreateWithParentAndId <T, A, B>(Entity parent, long id, A a, B b) where T : Entity
        {
            Type type      = typeof(T);
            T    component = (T)Entity.Create(type, true);

            component.Id     = id;
            component.Parent = parent;

            RunSystem.Awake(component, a, b);
            return(component);
        }
Пример #11
0
        void Update()
        {
            Utility.Timer.Update();

            ThreadSynchronizationContext.Instance.Update();

            HotfixStart.Update();

            RunSystem.Update();

            RunSystem.Update(Time.deltaTime, Time.unscaledDeltaTime);
        }
Пример #12
0
        void Awake()
        {
            DontDestroyOnLoad(this);

            //======启动核心组件======


            Options.This = new Options();

            //日志
            Log.SetLogHelper(new LogHelper());

            //压缩
            Utility.Zip.SetZipHelper(new ZipHelper());

            //加载核心Dll前缀
            Utility.Assembly.LoadAssembly("DBD");

            //CFrame 启动
            RunSystem.Instantiation();

            //添加组件
            AddComponent();
        }
Пример #13
0
        private void LateUpdate()
        {
            HotfixStart.LateUpdate();

            RunSystem.LateUpdate();
        }
Пример #14
0
        void Start()
        {
            RunSystem.Start();

            //ProcedureComponent.This.StartProcedure<ProcedureLaunch>();
        }