[gnome-games] Added MarioBros-like animation whena part of the worm disapear...



commit 17b2419edbe27f1d0dc05b9c0f17eb23e38e8aa0
Author: Guillaume Beland <guillaume beland gmail com>
Date:   Tue Aug 4 18:45:48 2009 -0400

    Added MarioBros-like animation whena part of the worm disapear...
    
    Still not viewable in the game because the actor is hiden before the animation
    complete

 gnibbles/worm-clutter.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gnibbles/worm-clutter.c b/gnibbles/worm-clutter.c
index 469340c..e068ca3 100644
--- a/gnibbles/worm-clutter.c
+++ b/gnibbles/worm-clutter.c
@@ -1065,10 +1065,16 @@ gnibbles_worm_shrink (GnibblesWorm *worm, gint shrinksize)
       return;
     } else if (actor_size == shrinksize) {
       //remove tail
+      clutter_actor_animate (tmp, CLUTTER_EASE_IN_ELASTIC, 420,
+                            "opacity", 0,
+                            NULL);
       gnibbles_worm_remove_actor (worm);
       return;
     } else {
       //remove tail, reduce the shrinksize variable by the tail's size
+      clutter_actor_animate (tmp, CLUTTER_EASE_IN_ELASTIC, 420,
+                            "opacity", 0,
+                            NULL);
       gnibbles_worm_remove_actor (worm);
       shrinksize -= actor_size;
     }



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