This repository has been archived by the owner on May 7, 2022. It is now read-only.
Bevy Tilemap 0.2.2
Added
Tilemap::clear_tile
was added to easily clear a single tile.Tilemap::clear_tiles
likewise will clear an array of tiles.Point2
now implementsFrom<&Point2>
.Point3
now implementsFrom<&Point3>
.tilemap::Tilemap::set_tiles
now implements
IntoIterator<Item = ((i32, i32, i32), Tile)>
which had broken the previous
compatibility.tile::Tile
had thenon_exhaustive
derive added it now that the fields are
all public.tile::Tile
added methodswith_tint
andwith_tint_and_z_order
.chunk_update_system
was added internally to manage chunks and to get them to
update if needed.
Changed
random_dungeon
example was updated to be interactive.Tilemap::set_tiles
was changed to take in aIntoIterator<Item = Tile<P, C>
,
whereC
isInto<Color>
and P isInto<Point2>
, from
IntoIterator<Item = (i32, i32, i32), Tile>
.tile::Tile
was changed to includez_order
,sprite_index
, andpoint
.
Fieldcolor
is nowtint
. All fields were made public.tile::Tile
methodsdefault
,new
updated.ChunkDimensions
was made private, it should never of been exposed but I also
very much doubt anyone would have used it.map_system
was made private, it should never of been exposed.add_tile
was renamed toinsert_tile
.add_tiles
was renamed toinsert_tiles
.clear_tile
was renamed toremove_tile
.clear_tiles
was renamed toremove_tiles
.
Before
let z_order = 0;
let point = (1, 1, z_order)
let tile = Tile::new(0);
let tiles = vec![(point, tile)];
// defined elsewhere
tilemap.set_tiles(tiles).unwrap();
After
let point = (1, 1);
let z_order = 0;
let tiles = vec![Tile::new(point, z_order)];
// defined elsewhere
tilemap.set_tiles(tiles).unwrap();
Tilemap::set_tile
was changed to take inTile<P, C>
, whereP
is
Into<Point2>
andC
isInto<Color>
. This replaces the previous argument
P
andT
whereT
wasInto<Tile>
.
Before
let point = (9, 3, 0);
let sprite_index = 3;
let tile = Tile::new(sprite_index);
// defined elsewhere
tilemap.set(point, tile).unwrap();
After
let point = (9, 3);
let sprite_index = 3;
let tile = Tile::new(point, sprite_index);
tilemap.set_tile(tile).unwrap();
Removed
tile::Tiles
was removed as it is no longer needed as all data as been set
intoTile
to make everything easier.tile::Tiles
was removed fromprelude
.tile::Tile
methodsindex
andcolor
were removed as the fields are now
public.tile::Tile
all<Into<Tile>>
implements were removed.
Upgrade notes
This was a good release to really start using the project with something. Adding it to my own game as well as building the interactive example really was eye opening on what I needed and what was missing. This is getting really close! Unfortunately, going to have to give up on setting deprecations until there is an actual stable release when all major milestones are completed and many examples are created to handle most use-cases.
Key points
- Random Dungeon was updated to be interactive.
add_
for tiles was renamed toinsert_
to be more exact. As well asremove_
instead ofclear
.- A system was added to handle chunks and update them when appropriate.