invert tiles
This commit is contained in:
parent
3ce85fcb5e
commit
01084d69df
|
@ -43,6 +43,14 @@ impl Tile {
|
||||||
|
|
||||||
// todo refactor
|
// 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) {
|
pub fn flip(&mut self) {
|
||||||
self.animation_frames = self.animation_frames.iter().map(|frame: &Image| {
|
self.animation_frames = self.animation_frames.iter().map(|frame: &Image| {
|
||||||
let mut image = frame.clone();
|
let mut image = frame.clone();
|
||||||
|
|
Loading…
Reference in New Issue