invert tiles

This commit is contained in:
Max Bradbury 2020-07-20 21:06:12 +01:00
parent 3ce85fcb5e
commit 01084d69df
1 changed files with 8 additions and 0 deletions

View File

@ -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();