diff --git a/src/tile.rs b/src/tile.rs index 0f49ab1..a3b9873 100644 --- a/src/tile.rs +++ b/src/tile.rs @@ -43,6 +43,14 @@ impl Tile { // todo refactor + pub fn invert(&mut self) { + self.animation_frames = self.animation_frames.iter().map(|frame: &Image| { + let mut image = frame.clone(); + image.invert(); + image + }).collect() + } + pub fn flip(&mut self) { self.animation_frames = self.animation_frames.iter().map(|frame: &Image| { let mut image = frame.clone();