private IEnumerator NextLevel() { youWinText.SetActive(true); elementMovement.StopFallingDown(); playerInput.SetActive(false); LevelController.Instance.ChangeLevel(); yield return(new WaitForSeconds(3f)); Tools.CurrentSceneReload(); }
//private Element GetRandomElement() //{ // return elements.listOfElements[Random.Range(0, elements.listOfElements.Count)]; //} private IEnumerator GameOver() { gameOverText.SetActive(true); elementMovement.StopFallingDown(); playerInput.SetActive(false); LevelController.Instance.Reset(); yield return(new WaitForSeconds(3f)); Tools.CurrentSceneReload(); }