diff options
author | tom barrett <spalf0@gmail.com> | 2019-07-13 04:51:26 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-07-13 04:51:26 -0500 |
commit | 9443ea856a706654916f0905d346c1e2c9d500c4 (patch) | |
tree | 027b69e10c482337cfc1109c58c50fdf32fa8c04 /src/animations.rs | |
parent | b4e83e63d46fdbc40f548bfa9bd95d7ed9912b8d (diff) |
less code
Diffstat (limited to 'src/animations.rs')
-rw-r--r-- | src/animations.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/animations.rs b/src/animations.rs index 58b6bf2..b57f69b 100644 --- a/src/animations.rs +++ b/src/animations.rs @@ -5,7 +5,7 @@ use std::time::Instant; use crate::constants; use crate::entity::Action; -use crate::tile::Tile; +use crate::tile::{Tile, flip}; use crate::tileset::Tileset; #[derive(Debug, Clone, PartialEq)] @@ -80,8 +80,8 @@ impl Animations { available.insert(Action::MovingUpLeft, animation.clone()); available.insert(Action::MovingDownLeft, animation.clone()); - idle.flip(); - moving.flip(); + let idle = flip(idle); + let moving = flip(moving); let animation = Animation::new(vec![idle.clone()]); available.insert(Action::IdleRight, animation.clone()); |