From 0f8a9c03f5838812473819e7ef2c50261e352fe7 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 24 Sep 2006 18:16:09 +0200 Subject: [PATCH] Made the alpha animators work on only one object. --- bin/embrace | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/embrace b/bin/embrace index f7ae62b..fa6f553 100755 --- a/bin/embrace +++ b/bin/embrace @@ -81,10 +81,9 @@ module Embrace # an animator that runs for the specified number of seconds, # and yields values between 0 and 255 class AlphaAnimator < ZeroToOneAnimator - def initialize(duration, *objects) + def initialize(duration, object) super(duration) do |v| - a = compute_alpha(v) - objects.each { |o| o.alpha = a } + object.alpha = compute_alpha(v) end end -- 2.30.2