示例#1
0
        public static EntityComponentsMask Build(params EntityComponentType[] componentTypes)
        {
            EntityComponentsMask result = 0;

            foreach (var componentType in componentTypes)
            {
                result = result.Or(componentType);
            }
            return(result);
        }
示例#2
0
 public static EntityComponentsMask Or(this EntityComponentsMask mask, EntityComponentType type)
 {
     return(mask | (EntityComponentsMask)(1 << (int)type));
 }
示例#3
0
 public static bool Contains(this EntityComponentsMask mask, EntityComponentsMask other)
 {
     return((mask & other) == other);
 }
示例#4
0
 protected EntitySystemService(EntityService entityService, EntityComponentsMask requiredComponentsMask)
 {
     EntityService          = entityService;
     RequiredComponentsMask = requiredComponentsMask;
 }