Ejemplo n.º 1
0
    IEnumerator CoroutineOnClickImageButtonRetry()
    {
        _isActive = false;
        _imageButtonTweet.color   = new Color(1.0f, 1.0f, 1.0f, 0.5f);
        _imageButtonRecords.color = new Color(1.0f, 1.0f, 1.0f, 0.5f);
        _imageButtonTitle.color   = new Color(1.0f, 1.0f, 1.0f, 0.5f);

        _audioSources[2].time = 0.0f;
        _audioSources[2].Play();

        _imageButtonRetry.sprite = spriteImageButtonRetrySelected;
        for (int i = 0; i < 6; i++)
        {
            _imageButtonRetry.color = new Color(0.5f, 0.5f, 0.5f);
            yield return(new WaitForSeconds(0.1f));

            _imageButtonRetry.color = new Color(1.0f, 1.0f, 1.0f);
            yield return(new WaitForSeconds(0.1f));
        }
        _mainSceneManager.Retry();
    }