Пример #1
0
    public IEnumerator Enemy_3_makes_decision()
    {
        if (active[3] == true && Enemy3_Money.money > 0)
        {
            yield return(new WaitForSeconds(3f));

            Enemy3.update_judgement();
            if (how_many_survive == 1)
            {
                Enemy3.decision = 1;
            }
            else
            {
                Enemy3.Calc_Decision();
            }


            if (Enemy3.decision == 0)
            {
                StartCoroutine(Enemy_3_throw_double(1f));
            }

            else if (Enemy3.decision == 1)
            {
                StartCoroutine(Enemy_3_throw_money(1f));
            }

            else if (Enemy3.decision == 2)
            {
                AudioSource.PlayClipAtPoint(Die_Sound, Camera.main.transform.position);

                active[3] = false;
                how_many_survive--;
            }
        }

        if (winner != 4)
        {
            yield return(StartCoroutine(Player_makes_decision()));
        }

        else
        {
            yield return(StartCoroutine(Check_Winner()));
        }
    }
Пример #2
0
    public IEnumerator Enemy_1_makes_decision()
    {
        if (active[1] == true && Enemy1_Money.money > 0)
        {
            yield return(new WaitForSeconds(2f));

            if (how_many_survive == 1)
            {
                Enemy1.decision = 1;
            }
            else
            {
                Enemy1.Calc_Decision();
            }
            if (Enemy1.decision == 0)
            {
                StartCoroutine(Enemy_1_throw_double(0.5f));
            }

            else if (Enemy1.decision == 1)
            {
                StartCoroutine(Enemy_1_throw_money(0.5f));
            }

            else if (Enemy1.decision == 2)
            {
                AudioSource.PlayClipAtPoint(Die_Sound, Camera.main.transform.position);
                active[1] = false;
                how_many_survive--;
            }
        }

        if (winner != 2)
        {
            yield return(StartCoroutine(Enemy_2_makes_decision()));
        }

        else
        {
            yield return(StartCoroutine(Check_Winner()));
        }

        yield return(null);
    }