public void StartNight() { int cupCount = cupMngr.transform.childCount; //setting all the other cups to inactive for (int i = 0; i < cupCount; i++) { cupMngr.transform.GetChild(i).gameObject.SetActive(false); } if (store.GetComponent <StoreUI>().ItemsBought.Count > 0) { cupMngr.transform.Find(store.GetComponent <StoreUI>().ItemsBought[store.GetComponent <StoreUI>().ItemsBought.Count - 1]).gameObject.SetActive(true); } store.SetActive(false); goalScreen.SetActive(true); foreach (GameObject painting in paintings) { Destroy(painting); } paintings = curatorScript.GeneratePaintings(Random.Range(10, 15)); paintingScripts = new List <Painting>(); foreach (GameObject painting in paintings) { paintingScripts.Add(painting.GetComponent(typeof(Painting)) as Painting); } influence.ResetInfluence(); GenerateGoals(); goalScreen.GetComponent <GoalsUI>().CreateText(goals, money); upvoteButton.interactable = true; downvoteButton.interactable = true; currentIndex = 1; PreviousPainting(); CheckButtons(); }