void PausedInput() { if (Input.GetKeyDown(KeyCode.Escape)) { PlayerGameMechanics playerGameMechanics = player.GetComponent(typeof(PlayerGameMechanics)) as PlayerGameMechanics; playerGameMechanics.TogglePause(); } if (Input.GetKeyDown(KeyCode.Return)) { GetComponent <DialogueManager>().theButton.onClick.Invoke(); //GetComponent<SceneManager>().GetComponent<DialogueManager>().DisplayNextSentence(); } }