[gnome-games/gnibbles-clutter] Nicer animation when worm die



commit 76ecc0e4403ac92f5254613ee1dc164b6bc4b818
Author: Guillaume Beland <guillaume beland gmail com>
Date:   Fri Jul 24 17:59:39 2009 -0400

    Nicer animation when worm die

 gnibbles/worm-clutter.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gnibbles/worm-clutter.c b/gnibbles/worm-clutter.c
index 60f4ec9..f9c5c35 100644
--- a/gnibbles/worm-clutter.c
+++ b/gnibbles/worm-clutter.c
@@ -398,20 +398,18 @@ gnibbles_worm_reset (ClutterAnimation *animation, gpointer data)
 static void *
 gnibbles_worm_animate (GnibblesWorm *worm)
 {
-  ClutterVertex center;
-  gint i, length;
+  gint i;
   ClutterActor *actor;
   ClutterAnimation *animation = NULL;
 
   gint count = clutter_group_get_n_children (CLUTTER_GROUP (worm->actors));
   for (i = 0; i < count; i++) {
     actor = clutter_group_get_nth_child (CLUTTER_GROUP (worm->actors), i);
-    length = gnibbles_worm_get_actor_length (actor);
-    center = (ClutterVertex) { length /2, 0, 0};
-    animation = clutter_actor_animate (actor, CLUTTER_EASE_OUT_QUAD, 700,
+    animation = clutter_actor_animate (actor, CLUTTER_EASE_OUT_QUAD, 600,
                            "opacity", 0,
                            "rotation-angle-z", 360.f * 2,
-                           "fixed::rotation-center-z", &center,
+                           "fixed::rotation-center-z-gravity", 
+                           CLUTTER_GRAVITY_CENTER,
                            NULL);
   }
 



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