コード例 #1
0
 private void CreateStandaloneObjects(IEnumerable <TileObject> otherObjects, ref int gridRowIndex)
 {
     foreach (TileObject otherObject in otherObjects)
     {
         CreateElementHeader(otherObject.Name, gridRowIndex);
         (int x, int y) = otherObject.Sprite.SpriteWidthHeight();
         Grid selectorGrid = AddSubGridToSelectorGrid(y, x, gridRowIndex);
         _selectorGridFiller = new SelectorGridFiller(selectorGrid, _selectorCreator);
         _selectorGridFiller.CreateGameObjectInsideSubGrid(otherObject);
         gridRowIndex += 2;
     }
 }
コード例 #2
0
 private void CreateGroups(IEnumerable <string> groups, List <TileObject> tileObjects, ref int rowIndex)
 {
     foreach (string group in groups)
     {
         TileObject[] objects = GetElementsOfGroup(tileObjects, group);
         CreateElementHeader(group, rowIndex);
         int  gridHeight   = (objects.Length - 1) / 3;
         Grid selectorGrid = AddSubGridToSelectorGrid(gridHeight, 2, rowIndex);
         _selectorGridFiller = new SelectorGridFiller(selectorGrid, _selectorCreator);
         _selectorGridFiller.CreateTilesInsideSubGrid(objects);
         rowIndex += 2;
     }
 }