예제 #1
0
    private IEnumerator UpdateShow(float animation_time)
    {
        Transform this_tranform = GetComponent <Transform>();

        ScaleAnimator.StartAnimation(ShowEasingType, this_tranform.localScale, Vector3.one, animation_time);
        yield return(new WaitForSeconds(animation_time));
    }
예제 #2
0
    private IEnumerator UpdateHide(float animation_time)
    {
        Transform this_tranform = GetComponent <Transform>();

        //ScaleAnimator.StartAnimation(EasingFunctions.TYPE.BackInCubic, this_tranform.localScale, Vector3.zero, animation_time);
        ScaleAnimator.StartAnimation(HideEasingType, this_tranform.localScale, Vector3.zero, animation_time);
        yield return(new WaitForSeconds(animation_time));

        gameObject.SetActive(false);
    }
예제 #3
0
    // .. COROUTINES

    private IEnumerator UpdateClicked(float animation_time)
    {
        onClick.Invoke();

        float     grow_time     = animation_time * 0.5f;
        float     shrink_time   = animation_time * 0.5f;
        Transform this_tranform = GetComponent <Transform>();

        ScaleAnimator.StartAnimation(EasingFunctions.TYPE.BackInCubic, this_tranform.localScale, Vector3.one * BounceFactor, grow_time);
        yield return(new WaitForSeconds(grow_time));

        ScaleAnimator.StartAnimation(EasingFunctions.TYPE.Out, this_tranform.localScale, Vector3.one, shrink_time);
        yield return(new WaitForSeconds(shrink_time));
    }