Minor edit
parent
40ba0fbc0f
commit
616e252ae3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue