示例#1
0
        private TileType ParseTileFromRule(LevelBuilderRule rule, TileType[] tileTypes)
        {
            int index;

            if (int.TryParse(rule.Tile, out index))
            {
                return(tileTypes[index]);
            }

            return(tileTypes.First(t => t.Type == rule.Tile));
        }
示例#2
0
        private TileType ParseTileFromRule(LevelBuilderRule rule, TileType[] tileTypes)
        {
            int index;

            if (int.TryParse(rule.Tile, out index))
            {
                return tileTypes[index];
            }

            return tileTypes.First(t => t.Type == rule.Tile);
        }