示例#1
0
        protected void Initialize <T1>(
            SystemProcessorCallback <T1> callback,
            ComponentId <T1> componentId1)
        {
            _processCallback = delegate(Entity entity)
            {
                ComponentReference <T1> component1 = entity.GetComponentReference(componentId1);

                callback.Invoke(entity, ref component1.Value);
            };
        }
示例#2
0
        protected void Initialize <T1, T2, T3>(
            SystemProcessorCallback <T1, T2, T3> callback,
            ComponentId <T1> componentId1,
            ComponentId <T2> componentId2,
            ComponentId <T3> componentId3)
        {
            _processCallback = delegate(Entity entity)
            {
                ComponentReference <T1> component1 = entity.GetComponentReference(componentId1);
                ComponentReference <T2> component2 = entity.GetComponentReference(componentId2);
                ComponentReference <T3> component3 = entity.GetComponentReference(componentId3);

                callback.Invoke(entity, ref component1.Value, ref component2.Value, ref component3.Value);
            };
        }
示例#3
0
        protected void Initialize <T1, T2, T3, T4, T5, T6>(
            SystemProcessorCallback <T1, T2, T3, T4, T5, T6> callback,
            ComponentId <T1> componentId1,
            ComponentId <T2> componentId2,
            ComponentId <T3> componentId3,
            ComponentId <T4> componentId4,
            ComponentId <T5> componentId5,
            ComponentId <T6> componentId6)
        {
            _processCallback = delegate(Entity entity)
            {
                ComponentReference <T1> component1 = entity.GetComponentReference(componentId1);
                ComponentReference <T2> component2 = entity.GetComponentReference(componentId2);
                ComponentReference <T3> component3 = entity.GetComponentReference(componentId3);
                ComponentReference <T4> component4 = entity.GetComponentReference(componentId4);
                ComponentReference <T5> component5 = entity.GetComponentReference(componentId5);
                ComponentReference <T6> component6 = entity.GetComponentReference(componentId6);

                callback.Invoke(entity, ref component1.Value, ref component2.Value, ref component3.Value, ref component4.Value, ref component5.Value, ref component6.Value);
            };
        }