[gnome-games/gnibbles-clutter-rebased: 65/129] Improved worm's explosion by adding a scale effect
- From: Jason Clinton <jclinton src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games/gnibbles-clutter-rebased: 65/129] Improved worm's explosion by adding a scale effect
- Date: Mon, 12 Oct 2009 21:31:41 +0000 (UTC)
commit 26166b56883614169b669dc099f541ddac067c5d
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", ¢er,
NULL);
diff --git a/gnibbles/worm-clutter.c b/gnibbles/worm-clutter.c
index 5ae9604..9ef45a3 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]