Minor edit

master
Mark 2024-01-25 21:22:53 -08:00
parent 40ba0fbc0f
commit 616e252ae3
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
1 changed files with 6 additions and 7 deletions

View File

@ -126,7 +126,12 @@ impl SpriteAutomaton {
fn take_edge(&mut self, ct: &Content, e: SectionEdge) {
let sprite = ct.get_sprite(self.sprite);
let current_section = sprite.get_section(self.current_section);
let last_direction = self.current_direction;
let last = match self.current_direction {
AnimDirection::Stop => self.next_texture,
AnimDirection::Down => self.next_texture,
AnimDirection::Up => self.last_texture,
};
match e {
SectionEdge::Stop => {
@ -198,12 +203,6 @@ impl SpriteAutomaton {
}
}
let last = match last_direction {
AnimDirection::Stop => self.last_texture,
AnimDirection::Down => self.next_texture,
AnimDirection::Up => self.last_texture,
};
match self.current_direction {
AnimDirection::Stop => {
let current_section = sprite.get_section(self.current_section);