public void AddTile(int id, int x, int y, int z,int flag)
 {
     var multi = new MultiTile() {ID = id, OffsetX = x, OffsetY = y, Z = z,Flag=flag};
    
     SelectTileforMultiTile(multi);
     MultiTiles.Add(multi);
 }
Beispiel #2
0
        public void AddTile(int id, int x, int y, int z, int flag)
        {
            var multi = new MultiTile()
            {
                ID = id, OffsetX = x, OffsetY = y, Z = z, Flag = flag
            };

            SelectTileforMultiTile(multi);
            MultiTiles.Add(multi);
        }
Beispiel #3
0
        private void SelectTileforMultiTile(MultiTile multitile)
        {
            foreach (var tile in TilesInfo.TilesCategorySDKModule.Categories.SelectMany(categorylist => categorylist.Select(tileCategory => tileCategory.FindTile(multitile.ID)).Where(tile => tile != null)))
            {
                multitile.SetTile(tile);
                var cat = tile.GetStyle().GetCategory();
                if (!Categories.Contains(cat))
                {
                    Categories.Add(cat);
                }
                switch (tile.GetType().Name)
                {
                case "TileWall":
                {
                    if (!Walls.Contains(cat))
                    {
                        Walls.Add(cat);
                    }
                    break;
                }

                case "TileFloor":
                {
                    if (!Floors.Contains(cat))
                    {
                        Floors.Add(cat);
                    }
                    break;
                }

                case "TileRoof":
                {
                    if (!Roofs.Contains(cat))
                    {
                        Roofs.Add(cat);
                    }
                    break;
                }

                case "TileMisc":
                {
                    if (!Misc.Contains(cat))
                    {
                        Misc.Add(cat);
                    }
                    break;
                }

                default:
                    return;
                }
                return;
            }
        }
 private void SelectTileforMultiTile(MultiTile multitile)
 {
     foreach (var tile in TilesInfo.TilesCategorySDKModule.Categories.SelectMany(categorylist => categorylist.Select(tileCategory => tileCategory.FindTile(multitile.ID)).Where(tile => tile != null)))
     {
         multitile.SetTile( tile);
         var cat = tile.GetStyle().GetCategory();
         if(!Categories.Contains(cat)) Categories.Add(cat);
         switch (tile.GetType().Name)
         {
             case "TileWall":
                 {
                     if (!Walls.Contains(cat)) Walls.Add(cat);
                     break;
                 }
             case "TileFloor":
                 {
                     if (!Floors.Contains(cat)) Floors.Add(cat);
                     break;
                 }
             case "TileRoof":
                 {
                     if (!Roofs.Contains(cat)) Roofs.Add(cat);
                     break;
                 }
             case "TileMisc":
                 {
                     if (!Misc.Contains(cat)) Misc.Add(cat);
                     break;
                 }
             default:
                 return;
                 
                 
         }
         return;
     }
 }