Пример #1
0
    //Turn Preparations
    IEnumerator SetA(List <int> nA)
    {
        EnableDisableExchange(false);
        confirmB.interactable = false;
        confirmB.GetComponentInChildren <SpriteOutline>().outlineSize = 0;
        a2Slider.AnimateSlide(0);
        a3Slider.AnimateSlide(0);
        yield return(new WaitForSeconds(2));


        for (int j = 0; j < 3; j++)
        {
            a[j]            = nA[j];
            bDrink[j].value = 0;
        }

        //fill
        //  b1Slider.AnimateSlide(a[3]);
        //   yield return new WaitForSeconds(1);
        b2Slider.AnimateSlide(a[0]);
        yield return(new WaitForSeconds(1));

        b3Slider.AnimateSlide(a[1]);
        yield return(new WaitForSeconds(1));

        b4Slider.AnimateSlide(a[2]);
        yield return(new WaitForSeconds(1));

        //pause
        yield return(new WaitForSeconds(1.5f));

        //drink

        d2Animator.SetBool("Drink", true);
        d3Animator.SetBool("Drink", true);
        b1Slider.AnimateSlide(0);
        b2Slider.AnimateSlide(0);
        a2Slider.AnimateSlide(a[0]);
        b3Slider.AnimateSlide(0);
        a3Slider.AnimateSlide(a[1]);
        b4Slider.AnimateSlide(0);


        //wait
        yield return(new WaitForSeconds(1));

        for (int i = 0; i < 3; i++)
        {
            cF[i].text = a[i].ToString();
        }
        d2Animator.SetBool("Drink", false);
        d3Animator.SetBool("Drink", false);
        SetTurnB();
    }
Пример #2
0
    //Turn Preparations
    IEnumerator SetA(List <int> nA)
    {
        EnableDisableExchange(false);
        confirmB.interactable = false;
        outlineEffect.GetComponent <Image>().color = new Color(0, 0, 0, 0);
        //confirmB.GetComponentInChildren<SpriteOutline>().outlineSize = 0;

        a1Slider.AnimateSlide(0);
        a2Slider.AnimateSlide(0);
        a3Slider.AnimateSlide(0);
        a4Slider.AnimateSlide(0);
        while (holdGame)
        {
            yield return(new WaitForEndOfFrame());
        }

        yield return(new WaitForSeconds(1));


        for (int j = 0; j < 4; j++)
        {
            A[j]            = nA[j];
            bDrink[j].value = 0;
        }

        //fill
        b1Slider.AnimateSlide(A[3]);
        b1Slider.GetComponent <AudioSource>().Play();
        yield return(new WaitForSeconds(1));

        b2Slider.AnimateSlide(A[0]);
        b2Slider.GetComponent <AudioSource>().Play();
        yield return(new WaitForSeconds(1));

        b3Slider.AnimateSlide(A[1]);
        b3Slider.GetComponent <AudioSource>().Play();
        yield return(new WaitForSeconds(1));

        b4Slider.AnimateSlide(A[2]);
        b4Slider.GetComponent <AudioSource>().Play();
        yield return(new WaitForSeconds(1));

        //pause
        yield return(new WaitForSeconds(1.5f));

        //drink
        d1Animator.SetBool("Drink", true);
        d2Animator.SetBool("Drink", true);
        d3Animator.SetBool("Drink", true);
        b1Slider.AnimateSlide(0);
        a1Slider.AnimateSlide(A[3]);
        b2Slider.AnimateSlide(0);
        a2Slider.AnimateSlide(A[0]);
        b3Slider.AnimateSlide(0);
        a3Slider.AnimateSlide(A[1]);
        b4Slider.AnimateSlide(0);
        a4Slider.AnimateSlide(A[2]);


        //wait
        yield return(new WaitForSeconds(1));

        for (int i = 0; i < 4; i++)
        {
            cF[i].text = A[i].ToString();
        }
        d1Animator.SetBool("Drink", false);
        d2Animator.SetBool("Drink", false);
        d3Animator.SetBool("Drink", false);
        SetTurnB();
    }