When key pressed, trigger walking animation
This commit is contained in:
parent
9c88169cf0
commit
88f6f52eb4
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue