IEnumerator nextRound() { yield return(new WaitForSeconds(0.5f)); for (int i = 0; i < foodButtons.Count; i++) { foodButtons [i].transform.SetParent(inventory.transform); } wrong.gameObject.SetActive(false); correct.gameObject.SetActive(false); gameOn = true; StaticCheckGame.nextRound(); StaticCheckGame.incRoundNumber(); setIngredients(); }
IEnumerator nextRound() { yield return(new WaitForSeconds(0.5f)); Image[] temp = new Image[6]; fullFoodButtons.CopyTo(temp); foodButtons = new List <Image> (); for (int i = 0; i < temp.Length; i++) { foodButtons.Add(temp [i]); } for (int i = 0; i < foodButtons.Count; i++) { foodButtons [i].transform.SetParent(inventory.transform); } wrong.gameObject.SetActive(false); correct.gameObject.SetActive(false); gameOn = true; StaticCheckGame.nextRound(); StaticCheckGame.incRoundNumber(); setFoods(); }