Exemplo n.º 1
0
    public void foodjudgment(Customertaste customertaste)
    {
        switch (customer_state)
        {
        case Customertaste.CUSTOMERNOTDELICIOUS:
            StartCoroutine(CUSTOMERNOTDELICIOUS());
            break;

        case Customertaste.CUSTOMERDELICIOUS:
            StartCoroutine(CUSTOMERDELICIOUS());
            break;
        }
    }
Exemplo n.º 2
0
    //맛있음
    IEnumerator CUSTOMERDELICIOUS()
    {
        switch (rndimg)
        {
        case 0:
            customer_slots.customers[rndimg].customerimg = customer_slots.customers[0].customerimg;
            Customerimg.sprite = customer_slots.customers[0].customerimg[3];
            break;

        case 1:
            customer_slots.customers[rndimg].customerimg = customer_slots.customers[1].customerimg;
            Customerimg.sprite = customer_slots.customers[1].customerimg[3];
            break;

        case 2:
            customer_slots.customers[rndimg].customerimg = customer_slots.customers[2].customerimg;
            Customerimg.sprite = customer_slots.customers[2].customerimg[3];
            break;

        case 3:
            customer_slots.customers[rndimg].customerimg = customer_slots.customers[3].customerimg;
            Customerimg.sprite = customer_slots.customers[3].customerimg[3];
            break;

        case 4:
            customer_slots.customers[rndimg].customerimg = customer_slots.customers[4].customerimg;
            Customerimg.sprite = customer_slots.customers[4].customerimg[3];
            break;
        }
        GameManager.Instance.customercrush.value += 0.1f;               //맛없으니 감소
        maxcustomer += 1;
        customerint += 1;
        //돈주고 나감
        //돈 이미지 출력
        customercoin.SetActive(true);
        speachImg.SetActive(true);
        RecipeButton.SetActive(false);
        speachtext.text = customer_slots.customers[rndimg].customermanager.cusinfo.customerscript[3];
        yield return(new WaitForSeconds(0.8f));

        speachImg.SetActive(false);
        customer_state = Customertaste.CUSTOMERDELICIOUS;
        yield return(new WaitForSeconds(4.0f));

        //퇴장
        StartCoroutine(TImeOver());
        yield return(null);
    }