Skip to content
Snippets Groups Projects
Verified Commit 0717a9dd authored by Louis's avatar Louis :fire:
Browse files

Assert first frame of next anim at end of OnceAndThen animations

parent 8d4a82c9
No related branches found
No related tags found
No related merge requests found
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.1]
### Fixed
- "play once and then" animations could overflow frame array bounds
\ No newline at end of file
[package]
name = "micro_banimate"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
license = "Apache-2.0"
description = "Easily manage complex Bevy 2D sprite animations"
......
......@@ -265,7 +265,7 @@ impl<'w, 's> AnimationQuery<'w, 's> {
None => continue,
};
let current = match sheet.get(&status.active_name) {
let mut current = match sheet.get(&status.active_name) {
Some(set) => set,
None => continue,
};
......@@ -288,6 +288,12 @@ impl<'w, 's> AnimationQuery<'w, 's> {
*mode = AnimationMode::Loop;
status.active_name = next.clone();
status.frame_time = 0.0;
status.active_step = 0;
current = match sheet.get(&status.active_name) {
Some(set) => set,
None => continue,
};
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment