When key pressed, trigger walking animation

This commit is contained in:
Thomas Forgione 2018-10-05 20:12:03 +02:00
parent 9c88169cf0
commit 88f6f52eb4
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ impl Drawable for Character {
fn texture_rect(&self) -> IntRect {
let frame = if let Some(started) = self.animation_timer {
duration_as_frame(&Instant::now().duration_since(started), 2)
1 - duration_as_frame(&Instant::now().duration_since(started), 2)
} else {
0
};