From 88f6f52eb4fceba6f61b8f9172f0e38aff2742de Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 5 Oct 2018 20:12:03 +0200 Subject: [PATCH] When key pressed, trigger walking animation --- src/engine/character/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/character/mod.rs b/src/engine/character/mod.rs index 1182e74..c775681 100644 --- a/src/engine/character/mod.rs +++ b/src/engine/character/mod.rs @@ -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 };