private void Update() { if (counterToChangeScene >= MIN_TO_CHANGE_SCENE) { HandleScene.StartChangeScene(5.0f); SceneManager.LoadScene("FreeFormWonderlandRaycastBuildOnPoint"); } }
private void OnCollisionEnter2D(Collision2D collision) { this.GetComponent <Rigidbody2D>().AddRelativeForce(collisionForce); // Trigger text change in the commentary object commentary.GetComponent <TextMesh>().text = "Then, one day,\nthere would be\nso many books\nthat she could climb them\nand walk on Mars."; commentary.GetComponent <TextMesh>().fontSize = 95; // Display text after a delay // StartCoroutine(StartDialogueNode("Then, one day,\nthere would be\nso many books\nthat she could climb them\nand walk on Mars.")); // TODO Attach a spring joint to the player and this sphere... walk on Mars effect? StartCoroutine(HandleScene.StartChangeScene(7.0f)); }