示例#1
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenScale Begin(GameObject go, float duration, Vector3 scale)
    {
        BCTweenScale comp = BCUITweener.Begin <BCTweenScale>(go, duration);

        comp.from = comp.value;
        comp.to   = scale;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
示例#2
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenPosition Begin(GameObject go, float duration, Vector3 pos)
    {
        BCTweenPosition comp = BCUITweener.Begin <BCTweenPosition>(go, duration);

        comp.from = comp.value;
        comp.to   = pos;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
示例#3
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenRotation Begin(GameObject go, float duration, Quaternion rot)
    {
        BCTweenRotation comp = BCUITweener.Begin <BCTweenRotation>(go, duration);

        comp.from = comp.value.eulerAngles;
        comp.to   = rot.eulerAngles;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
示例#4
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenNumText Begin(GameObject go, float duration, int Num)
    {
        BCTweenNumText comp = BCUITweener.Begin <BCTweenNumText>(go, duration);

        comp.from = comp.value;
        comp.to   = Num;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
示例#5
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenAlpha Begin(GameObject go, float duration, float alpha)
    {
        BCTweenAlpha comp = BCUITweener.Begin <BCTweenAlpha>(go, duration);

        comp.from = comp.value;
        comp.to   = alpha;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
示例#6
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenColor Begin(GameObject go, float duration, Color color)
    {
#if UNITY_EDITOR
        if (!Application.isPlaying)
        {
            return(null);
        }
#endif
        BCTweenColor comp = BCUITweener.Begin <BCTweenColor>(go, duration);
        comp.from = comp.value;
        comp.to   = color;

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