[hamster-applet] added finish function to finish all tweens



commit 19ca8396f1ed39e05b98552f89d587a8a56e9108
Author: Toms Bauģis <toms baugis gmail com>
Date:   Fri Nov 27 11:52:29 2009 +0000

    added finish function to finish all tweens

 hamster/pytweener.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/hamster/pytweener.py b/hamster/pytweener.py
index 790b88f..113b4a5 100644
--- a/hamster/pytweener.py
+++ b/hamster/pytweener.py
@@ -90,6 +90,11 @@ class Tweener:
             if t.target is obj:
                 t.complete = True
  
+    def finish(self):
+        #go to last frame for all tweens
+        for t in self.currentTweens:
+            t.update(t.duration)
+        self.currentTweens = []
  
     def update(self, timeSinceLastFrame):
         removable = []



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]