When key pressed, trigger walking animation
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user