Made the alpha animators work on only one object.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 24 Sep 2006 16:16:09 +0000 (18:16 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 24 Sep 2006 16:16:09 +0000 (18:16 +0200)
bin/embrace

index f7ae62b0cf9ac72c17113b558c37a80e033e568d..fa6f5534fe6abdd438800d5661409b70950844fa 100755 (executable)
@@ -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