@@ -0,0 +1,2952 @@
+/* brainGDX project provides utilities for libGDX%0A * Copyright (C) 2015 Miguel Gonzalez%0A *%0A * This program is free software; you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation; either version 2 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License along%0A * with this program; if not, write to the Free Software Foundation, Inc.,%0A * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.%0A */%0A%0Apackage de.bitbrain.braingdx.tweens;%0A%0Aimport com.badlogic.gdx.graphics.Color;%0A%0Aimport aurelienribon.tweenengine.Tween;%0Aimport aurelienribon.tweenengine.TweenEquation;%0Aimport aurelienribon.tweenengine.TweenEquations;%0Aimport aurelienribon.tweenengine.TweenManager;%0A%0A/**%0A * Provides animation utilities%0A *%0A * @since 1.0.0%0A * @version 1.0.0%0A * @author Miguel Gonzalez %3Cmiguel-gonzalez@gmx.de%3E%0A */%0Apublic final class TweenUtils %7B%0A%0A    private static TweenManager tweenManager = SharedTweenManager.getInstance();%0A%0A    /**%0A     * Fades the source color object into the target color in the given time%0A     *%0A     * @param sourceColor the source color%0A     * @param targetColor the target color%0A     * @param time given decimal time (in seconds)%0A     * @param equation tween equation%0A     */%0A    public static void toColor(Color sourceColor, Color targetColor, float time, TweenEquation equation) %7B%0A        tweenManager.killTarget(sourceColor, ColorTween.R);%0A        tweenManager.killTarget(sourceColor, ColorTween.G);%0A        tweenManager.killTarget(sourceColor, ColorTween.B);%0A        Tween.to(sourceColor.r, ColorTween.R, time).ease(equation).target(targetColor.r).start(tweenManager);%0A        Tween.to(sourceColor.g, ColorTween.G, time).ease(equation).target(targetColor.g).start(tweenManager);%0A        Tween.to(sourceColor.b, ColorTween.B, time).ease(equation).target(targetColor.b).start(tweenManager);%0A    %7D%0A%0A    /**%0A     * Fades the source color object into the target color in the given time%0A     *%0A     * @param sourceColor the source color%0A     * @param targetColor the target color%0A     * @param time given decimal time (in seconds)%0A     */%0A    public static void toColor(Color sourceColor, Color targetColor, float time) %7B%0A        toColor(sourceColor, targetColor, time, TweenEquations.easeNone);%0A    %7D%0A%0A    /**%0A     * Fades the source color object into the target color in 1 second%0A     *%0A     * @param sourceColor the source color%0A     * @param targetColor the target color%0A     */%0A    public static void toColor(Color sourceColor, Color targetColor) %7B%0A        toColor(sourceColor, targetColor, 1f, TweenEquations.easeNone);%0A    %7D%0A%7D%0A

Add TweenUtils