예제 #1
0
    IEnumerator OvenTimer()
    {
        int i = 0;

        while (i < 45)
        {
            i++;
            if (i == 30)
            {
                GreenLight.SetActive(true);
                GetPizzaStatus = pizzaStatus.cooked;
            }
            yield return(new WaitForSeconds(1f));
        }
        GreenLight.SetActive(false);
        redLight.SetActive(true);
        GetPizzaStatus = pizzaStatus.burnt;
    }
예제 #2
0
    public void CookPizza(Transform pizza)
    {
        tempCount = 0;
        foreach (Transform item in pizza.transform)
        {
            if (item.gameObject.activeSelf)
            {
                CookedPizzaIngredient[itemCount].SetActive(true);
                tempCount++;
            }

            playerManager.baseProductHand[itemCount].SetActive(false);

            itemCount++;
        }
        itemCount = 0;
        pizza.gameObject.SetActive(false);
        GetPizzaStatus           = pizzaStatus.notCooked;
        playerManager.hasProduct = false;
        StartCoroutine(OvenTimer());
    }
예제 #3
0
 private void Start()
 {
     GetOvenStatus  = ovenStatus.empty;
     GetPizzaStatus = pizzaStatus.notCooked;
     playerManager  = PlayerManager.instance;
 }