private IEnumerator _FadeInOut() { BlackScreenIn.SetActive(true); yield return(new WaitForSeconds(1.3f)); BlackScreenOut.SetActive(true); BlackScreenIn.SetActive(false); yield return(new WaitForSeconds(1f)); BlackScreenOut.SetActive(false); }
private IEnumerator StartGameOverAnim() { yield return(new WaitForSeconds(1)); // GameOverSound.Play(); audiosLose[Random.Range(0, audiosLose.Length)].Play(); GameOver.SetActive(false); GameOver.SetActive(true); GameOver.transform.position = Camera.main.transform.position + new Vector3(-13.34f, -25.9f, 20); BlackScreenIn.SetActive(false); BlackScreenOut.SetActive(false); yield return(null); }
private IEnumerator FinishGameOverAnim(bool goMenu) { BlackScreenIn.SetActive(true); yield return(new WaitForSeconds(1f)); if (goMenu) { CameraMovementScript.SetPosition(0); } BlackScreenOut.SetActive(true); BlackScreenIn.SetActive(false); GameOver.SetActive(false); yield return(new WaitForSeconds(1f)); BlackScreenOut.SetActive(false); IsActive = false; }