Exemplo n.º 1
0
        public void AddGroup(QueryGroup group, QueryGroup newGroup, int index = -1)
        {
            int insertIndex;

            if (index == -1)
            {
                insertIndex = group.GroupStartIndex + group.TotalGroupCount;
            }
            else
            {
                insertIndex = group.GroupStartIndex;
                for (int i = 0; i < index; i++)
                {
                    insertIndex += 1 + Groups[insertIndex].TotalGroupCount;
                }
            }
            Groups.Insert(insertIndex, newGroup);
            group.GroupCount++;
            RecomputeAll();
        }
Exemplo n.º 2
0
 public QueryContainer(string name)
 {
     Groups     = new List <QueryGroup>();
     RootGroup  = new QueryGroup(name);
     Components = new List <QueryComponent>();
 }
Exemplo n.º 3
0
 int FindIndex(QueryGroup group, QueryGroup toFind)
 {
     return(Groups.FindIndex(group.GroupStartIndex, group.GroupCount, g => g == toFind));
 }
Exemplo n.º 4
0
 public void AddComponent(QueryGroup group, TypeHandle componentType)
 {
     AddComponent(group, new QueryComponent(componentType));
 }