示例#1
0
        public System(int SystemLevel)
        {
            var Result = GetType().GetCustomAttribute <SystemReader>();

            if (Result != null)
            {
                foreach (var B in Result.ComponentType)
                {
                    EntityBits myReturnedComponentID = ComponentRegistration.GetComponentBitset(B);
                    SystemReader.AddToAndSet(myReturnedComponentID);
                }
            }
            var Result2 = GetType().GetCustomAttribute <SystemWriter>();

            if (Result2 != null)
            {
                foreach (var B in Result2.ComponentType)
                {
                    EntityBits myReturnedComponentID = ComponentRegistration.GetComponentBitset(B);
                    SystemWriter.AddToAndSet(myReturnedComponentID);
                }
            }

            this.ExecutionOrder = SystemLevel;
        }
 private void LoadGenericTypesIntoMatcher()
 {
     Type[] myType = typeof(T).GetGenericArguments();
     InternalMatcher = new Matcher();
     foreach (Type A in myType)
     {
         InternalMatcher.AddToAndSet(ComponentRegistration.GetComponentBitset(A));
     }
 }