Merge pull request #101 from arturo182/patch-1
sequence: Add a function to play the previous animation
This commit is contained in:
commit
795be500a6
1 changed files with 7 additions and 0 deletions
|
|
@ -179,6 +179,13 @@ class AnimationSequence:
|
||||||
self.on_cycle_complete()
|
self.on_cycle_complete()
|
||||||
self.activate(current % len(self._members))
|
self.activate(current % len(self._members))
|
||||||
|
|
||||||
|
def previous(self):
|
||||||
|
"""
|
||||||
|
Jump to the previous animation.
|
||||||
|
"""
|
||||||
|
current = self._current - 1
|
||||||
|
self.activate(current % len(self._members))
|
||||||
|
|
||||||
def random(self):
|
def random(self):
|
||||||
"""
|
"""
|
||||||
Jump to a random animation.
|
Jump to a random animation.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue