[gnome-games/gnibbles-clutter] Improved worm's explosion by adding a scale effect



commit 4075a24c5e3bc7ba0a01e215c62b86c1963af86e
Author: Guillaume Beland <guillaume beland gmail com>
Date:   Fri Jul 24 18:24:31 2009 -0400

    Improved worm's explosion by adding a scale effect

 gnibbles/bonus.c        |    2 +-
 gnibbles/worm-clutter.c |    7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gnibbles/bonus.c b/gnibbles/bonus.c
index 87fe283..7ccbf77 100644
--- a/gnibbles/bonus.c
+++ b/gnibbles/bonus.c
@@ -61,7 +61,7 @@ animate_bonus (ClutterAnimation *animation, ClutterActor *actor)
   ClutterAnimation *anim;
 
   center = (ClutterVertex){(gfloat)properties->tilesize, 0, 0};
-  anim = clutter_actor_animate (actor, CLUTTER_LINEAR, 1300,
+  anim = clutter_actor_animate (actor, CLUTTER_LINEAR, 2000,
                          "rotation-angle-y", 360.f,
                          "fixed::rotation-center-y", &center,
                          NULL);
diff --git a/gnibbles/worm-clutter.c b/gnibbles/worm-clutter.c
index f9c5c35..13b2698 100644
--- a/gnibbles/worm-clutter.c
+++ b/gnibbles/worm-clutter.c
@@ -401,12 +401,17 @@ gnibbles_worm_animate (GnibblesWorm *worm)
   gint i;
   ClutterActor *actor;
   ClutterAnimation *animation = NULL;
-
+  gfloat w,h;
   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);
+    clutter_actor_get_size (actor, &w, &h);
+
     animation = clutter_actor_animate (actor, CLUTTER_EASE_OUT_QUAD, 600,
                            "opacity", 0,
+                           "width", w * 1.5,
+                           "height", h * 1.5,
                            "rotation-angle-z", 360.f * 2,
                            "fixed::rotation-center-z-gravity", 
                            CLUTTER_GRAVITY_CENTER,



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