From: Tilman Sauerbeck Date: Sun, 24 Sep 2006 16:16:09 +0000 (+0200) Subject: Made the alpha animators work on only one object. X-Git-Tag: embrace-0.1.0~12 X-Git-Url: http://git.code-monkey.de/?p=embrace.git;a=commitdiff_plain;h=0f8a9c03f5838812473819e7ef2c50261e352fe7 Made the alpha animators work on only one object. --- 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