[gnome-games/gnibbles-clutter] Some tweak on bonus and warp animation
- From: Guillaume Béland <guillaubel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games/gnibbles-clutter] Some tweak on bonus and warp animation
- Date: Wed, 5 Aug 2009 01:04:59 +0000 (UTC)
commit 028cea0d63ba1089733a846a8e043cc4171d778d
Author: Guillaume Beland <guillaume beland gmail com>
Date: Tue Aug 4 21:04:32 2009 -0400
Some tweak on bonus and warp animation
gnibbles/bonus.c | 9 ++++++---
gnibbles/warp.c | 5 ++++-
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gnibbles/bonus.c b/gnibbles/bonus.c
index 3a3eaff..b4f60ff 100644
--- a/gnibbles/bonus.c
+++ b/gnibbles/bonus.c
@@ -40,7 +40,7 @@ extern ClutterActor *stage;
static void animate_bonus1 (ClutterAnimation *animation, ClutterActor *actor);
static void animate_bonus2 (ClutterAnimation *animation, ClutterActor *actor);
-
+/*
static void
animate_bonus_rotate (ClutterAnimation *animation, ClutterActor *actor)
{
@@ -54,7 +54,7 @@ animate_bonus_rotate (ClutterAnimation *animation, ClutterActor *actor)
NULL);
clutter_animation_set_loop (anim, TRUE);
}
-
+*/
static void
animate_bonus1 (ClutterAnimation *animation, ClutterActor *actor)
{
@@ -115,8 +115,11 @@ gnibbles_bonus_draw (GnibblesBonus *bonus)
clutter_container_add_actor (CLUTTER_CONTAINER (stage), bonus->actor);
clutter_actor_set_opacity (bonus->actor, 0);
+ clutter_actor_set_scale (bonus->actor, 2.0, 2.0);
g_signal_connect_after (
- clutter_actor_animate (bonus->actor, CLUTTER_EASE_IN_QUAD, 500,
+ clutter_actor_animate (bonus->actor, CLUTTER_EASE_OUT_CIRC, 500,
+ "scale-x", 1.0, "scale-y", 1.0,
+ "fixed::scale-gravity", CLUTTER_GRAVITY_CENTER,
"opacity", 0xff,
NULL),
"completed", G_CALLBACK (animate_bonus1), bonus->actor);
diff --git a/gnibbles/warp.c b/gnibbles/warp.c
index e366c5a..d33d1c5 100644
--- a/gnibbles/warp.c
+++ b/gnibbles/warp.c
@@ -66,7 +66,10 @@ gnibbles_warp_draw (GnibblesWarp *warp)
properties->tilesize * warp->y);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), warp->actor);
clutter_actor_set_opacity (warp->actor, 0);
- clutter_actor_animate (warp->actor, CLUTTER_EASE_IN_QUAD, 410,
+ clutter_actor_set_scale (warp->actor, 2.0, 2.0);
+ clutter_actor_animate (warp->actor, CLUTTER_EASE_OUT_CIRC, 410,
+ "scale-x", 1.0, "scale-y", 1.0,
+ "fixed::scale-gravity", CLUTTER_GRAVITY_CENTER,
"opacity", 0xff,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]