private IEnumerator Deactivate()
    {
        ActivateObjectSwitcher activateObjectSwitcher = GetComponent <ActivateObjectSwitcher>();

        activateObjectSwitcher.Deactive();
        scaleAnimation.Activate();
        yield return(new WaitForSeconds(scaleAnimation.FullTimeAnimation()));

        activateObjectSwitcher.Activate();
    }
Beispiel #2
0
    private IEnumerator Changer()
    {
        Vector3 startTextScale   = transform.localScale;
        Vector3 startPointsScale = points.transform.localScale;

        ActivateObjectSwitcher activateObjectSwitcher = transform.parent.GetComponent <ActivateObjectSwitcher>();

        activateObjectSwitcher.Activate();

        ChangeScale(startTextScale * scaleRangeChangeMultiplier, this.gameObject);
        ChangeScale(startPointsScale * scaleRangeChangeMultiplier, points.gameObject);

        yield return(new WaitForSeconds(scaleSpeedCnange));

        ChangeScale(startTextScale, this.gameObject);
        ChangeScale(startPointsScale, points.gameObject);

        yield return(new WaitForSeconds(scaleSpeedCnange));

        activateObjectSwitcher.Deactive();
    }