예제 #1
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenAlpha Begin(GameObject go, float duration, float targetVolume)
    {
        TweenAlpha comp = ThunderTweener.Begin <TweenAlpha>(go, duration);

        comp.from = comp.value;
        comp.to   = targetVolume;

        if (targetVolume > 0f)
        {
            var s = comp.image;
            s.enabled = true;
        }
        return(comp);
    }
예제 #2
0
파일: TweenTransform.cs 프로젝트: nqnq/pa22
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenTransform Begin(GameObject go, float duration, Transform from, Transform to)
    {
        TweenTransform comp = ThunderTweener.Begin <TweenTransform>(go, duration);

        comp.from = from;
        comp.to   = to;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
예제 #3
0
파일: TweenScale.cs 프로젝트: nqnq/pa22
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

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

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

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

    static public TweenFOV Begin(GameObject go, float duration, float to)
    {
        TweenFOV comp = ThunderTweener.Begin <TweenFOV>(go, duration);

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

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

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

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

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

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

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

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

    static public TweenVolume Begin(GameObject go, float duration, float targetVolume)
    {
        TweenVolume comp = ThunderTweener.Begin <TweenVolume>(go, duration);

        comp.from = comp.value;
        comp.to   = targetVolume;

        if (targetVolume > 0f)
        {
            var s = comp.audioSource;
            s.enabled = true;
            s.Play();
        }
        return(comp);
    }