From 9443ea856a706654916f0905d346c1e2c9d500c4 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Sat, 13 Jul 2019 04:51:26 -0500 Subject: less code --- src/animations.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/animations.rs') 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()); -- cgit v1.2.3