[gnome-games] [same-gnome-clutter] Implement non-zealous animation
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] [same-gnome-clutter] Implement non-zealous animation
- Date: Sat, 18 Jul 2009 22:23:25 +0000 (UTC)
commit b9466343f797916b742b89a7730408e7df68f796
Author: Tim Horton <hortont svn gnome org>
Date: Sat Jul 18 18:21:30 2009 -0400
[same-gnome-clutter] Implement non-zealous animation
same-gnome-clutter/src/Board.js | 4 ++--
same-gnome-clutter/src/Light.js | 5 ++++-
same-gnome-clutter/src/main.js | 5 -----
3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/same-gnome-clutter/src/Board.js b/same-gnome-clutter/src/Board.js
index 03c89b0..de66605 100644
--- a/same-gnome-clutter/src/Board.js
+++ b/same-gnome-clutter/src/Board.js
@@ -98,7 +98,7 @@ Board = new GType({
{
var points_awarded = calculate_score(tiles);
- if(main.fly_score)
+ if(Settings.zealous)
{
var score_text = new Score.Score();
score_text.animate_score(points_awarded);
@@ -234,7 +234,7 @@ Board = new GType({
var new_y = (main.size_o.rows - y - 1) * main.tile_size + main.offset;
if(!li.get_closed() && ((new_x != li.x) ||
- (new_y != li.y)))
+ (new_y != li.y)))
{
li.animate_to(new_x, new_y, anim_timeline);
}
diff --git a/same-gnome-clutter/src/Light.js b/same-gnome-clutter/src/Light.js
index b756b2b..0c2552f 100644
--- a/same-gnome-clutter/src/Light.js
+++ b/same-gnome-clutter/src/Light.js
@@ -53,7 +53,10 @@ Light = new GType({
this.animate_to = function (new_x, new_y, timeline)
{
- this.animate_with_timeline(Clutter.AnimationMode.EASE_OUT_BOUNCE, timeline,
+ var anim_mode = Settings.zealous ?
+ Clutter.AnimationMode.EASE_OUT_BOUNCE :
+ Clutter.AnimationMode.EASE_OUT_QUAD;
+ this.animate_with_timeline(anim_mode, timeline,
{
x: new_x,
y: new_y
diff --git a/same-gnome-clutter/src/main.js b/same-gnome-clutter/src/main.js
index e40b446..76d47d4 100755
--- a/same-gnome-clutter/src/main.js
+++ b/same-gnome-clutter/src/main.js
@@ -2,14 +2,9 @@
// Configuration
-var tiles_w = 15;
-var tiles_h = 10;
var tile_size = 50;
var offset = tile_size/2;
-var max_colors = 3;
-var fly_score = true;
-
imports.gi.versions.Clutter = "0.9";
Gtk = imports.gi.Gtk;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]