Skip to content

Commit

Permalink
fix(#61): do not skip last frame for animated tiles (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-bon authored Dec 14, 2024
1 parent 75636a8 commit b9bf394
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ A [migration guide](https://adrien-bon.github.io/bevy_ecs_tiled/migrations/v0_5.
- Remove `map_initial_transform` and `map_initial_visibility` from `TiledMapSettings`, use required components instead
- Simplify map reload mechanisms and update corresponding example

### Bugfixes

- Do not skip last frame for animated tiles (#61)

## v0.4.2

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ fn get_animated_tile(tile: &Tile) -> Option<AnimatedTile> {

Some(AnimatedTile {
start: first_tile.tile_id,
end: last_tile.tile_id,
end: last_tile.tile_id + 1,
speed: 1000. / first_tile.duration as f32, // duration is in ms and we want a 'frames per second' speed
})
}
Expand Down

0 comments on commit b9bf394

Please sign in to comment.