/// <summary> /// Create a new static tile. /// Static tiles do NOT UPDATE. /// If you want a tile that spawns projectiles/enemies, or moves, use a tileDynamic. /// </summary> /// <param name="brush">Rectangle of the position and size.</param> /// <param name="textureName">name of the texture to apply to the tile.</param> /// <param name="layer">layer on which to create the tile. 0-8</param> /// <returns>instance of the created tile.</returns> public static Tile CreateTileStatic(Rectangle brush, string textureName, int layer, bool setWall = false, Directions setFacing = Directions.North) { //Todo add index TileStatic t = new TileStatic(brush, textureName, layer); t.Initialize(); t.wall = setWall; t.facing = setFacing; World.tiles.Add(t); return(t); }
/// <summary> /// Create a new static tile. /// Static tiles do NOT UPDATE. /// If you want a tile that spawns projectiles/enemies, or moves, use a tileDynamic. /// </summary> /// <param name="brush">Rectangle of the position and size.</param> /// <param name="textureName">name of the texture to apply to the tile.</param> /// <param name="layer">layer on which to create the tile. 0-8</param> /// <returns>instance of the created tile.</returns> public static Tile CreateTileStatic(Rectangle brush, string textureName, int layer, bool setWall = false, Directions setFacing = Directions.North) { //Todo add index TileStatic t = new TileStatic(brush, textureName, layer); t.Initialize(); t.wall = setWall; t.facing = setFacing; World.tiles.Add(t); return t; }