public void ResetGame() { theDeathScreen.gameObject.SetActive (false); score = 0; scoreText.text = score.ToString (); PlatformOne.gameObject.SetActive (true); PlatformTwo.gameObject.SetActive (true); PlatformThree.gameObject.SetActive (true); topCube.SetActive (true); middleCube.SetActive (true); bottomCube.SetActive (true); GetRightAnswerFromDatabase (); GetPlatformStrings (); AssignPlatformStrings (); ChangeSentenceText (); countdownObject.gameObject.SetActive (true); secondsLeft = 8.0f; theObsSpawner.GetWall (); theObsSpawner.theWallToDelete.SetActive (false); theObsSpawner.TheCuboid.transform.position = theObsSpawner.StartPoint.transform.position; player.SetActive (true); }
void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { theFlyGameManager.AddScore(1); theFlyGameManager.PlatformOne.gameObject.SetActive(true); theFlyGameManager.PlatformTwo.gameObject.SetActive(true); theFlyGameManager.PlatformThree.gameObject.SetActive(true); theFlyGameManager.GetRightAnswerFromDatabase(); theFlyGameManager.GetPlatformStrings(); theFlyGameManager.AssignPlatformStrings(); theFlyGameManager.ChangeSentenceText(); theFlyGameManager.countdownObject.gameObject.SetActive(true); theFlyGameManager.secondsLeft = 8.0f; theObsSpawner.theWallToDelete.SetActive(true); theObsSpawner.GetWall(); theObsSpawner.theWallToDelete.SetActive(false); } }