コード例 #1
0
ファイル: TweenColor.cs プロジェクト: Car3man/ProjectKillers
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenColor Begin(GameObject go, float duration, float colorLerp)
    {
        TweenColor comp = UITweener.Begin <TweenColor>(go, duration);

        comp.from = comp.Color;
        comp.to   = comp.GetColor(colorLerp);

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }