Esempio n. 1
0
 /* The TileMap class has two constructors. The first one takes tilesets and map layers, and sets them all correctly. */
 public TileMap(List <Tileset> tilesets, AnimatedTileset animatedTileset, List <InterfaceLayer> mapLayers, AnimatedMapLayer animatedLayer)
 {
     this.tilesets        = tilesets;
     this.mapLayers       = mapLayers;
     this.animatedTileset = animatedTileset;
     this.animatedLayer   = animatedLayer;
 }
Esempio n. 2
0
 /* The second constructor only takes one map layer instead of a list of them.
  * It does the same as the first constructor, except the mapLayers list is initialized, and the first layer is added from there. */
 public TileMap(Tileset tileset, AnimatedTileset animatedTileset, MapLayer layer)
 {
     tilesets = new List <Tileset>();
     tilesets.Add(tileset);
     this.animatedTileset = animatedTileset;
     animatedLayer        = new AnimatedMapLayer();
     mapLayers            = new List <InterfaceLayer>();
     mapLayers.Add(layer);
 }