public void Reset(bool fromAd) { theDeathScreen.gameObject.SetActive(false); platformList = FindObjectsOfType <PlatformDestroyer> (); for (int i = 0; i < platformList.Length; i++) { platformList [i].gameObject.SetActive(false); } for (int i = 1; i < theParallaxController.backgrounds.Count; i++) { theParallaxController.backgrounds [i].SetActive(false); } theDayNightController.resetBackgroundColors(); GameObject firstPlatform = (GameObject)Instantiate(firstPlatformReal); firstPlatform.SetActive(true); firstPlatform.transform.position = firstPlatformStartPoint.position; thePlayer.transform.position = playerStartPoint; theBackgroundGenerator.transform.parent = null; theBackgroundGenerator.transform.position = backgroundStartPoint; theParallaxController.backgrounds [0].transform.localPosition = firstMovingBackgroundStartPoint; theParallaxController.previousCamPos = theParallaxController.camStartPoint; platformGenerator.position = platformStartPoint; thePlayer.gameObject.SetActive(true); if (!fromAd) { theScoreManager.scoreCount = 0; } else { theKeepRunningScreen.SetActive(false); } theScoreManager.scoreIncreasing = true; powerupReset = true; }