refactor: unify ghost state management and animation handling, use integers for texture animation

This commit is contained in:
Ryan Walters
2025-09-01 14:27:48 -05:00
parent e1a2e6ab62
commit b53db3788d
13 changed files with 221 additions and 217 deletions

View File

@@ -57,7 +57,8 @@ pub fn directional_render_system(
if let Some(texture) = texture {
if !stopped {
texture.tick(dt.0);
let ticks = (dt.0 * 60.0).round() as u16; // Convert from seconds to ticks at 60 ticks/sec
texture.tick(ticks);
}
let new_tile = *texture.current_tile();
if renderable.sprite != new_tile {