Beispiel #1
0
 static Gameplay()
 {
     using (Stream stream = Util.ReadResourceStream("Resources.Gameplay0.png")) {
         TileSet = new Bitmap(stream);
     }
     ParseItems();
     foreground = new AutoTiler(Util.ReadResource("Resources.ForegroundTiles.xml"));
     background = new AutoTiler(Util.ReadResource("Resources.BackgroundTiles.xml"));
 }
Beispiel #2
0
        private TileGrid GenerateLevelTiles(MapElement level, string objects, int width, int height, AutoTiler tiler, out VirtualMap <char> map)
        {
            MapElement tileData = level.SelectFirst(objects);

            map = ReadMapChar(tileData == null ? string.Empty : tileData.Attr("InnerText"), width, height);
            return(tiler.GenerateMap(map, true));
        }