void CheckEnemies() { if (!sceneEnded && enemyCount == 0) { sceneEnded = true; dialogManager.ShowDialog(() => { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }, new Tuple <string, string>("David", "Floor cleared.")); } }
protected override void Die() { if (!dead) { dead = true; RenderHp(); if (isAtBoss) { if (MathSET.Map(boss.currentHp, 0f, boss.maxHp, 0f, 1f) > 0.05f) { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); } else { dialogManager.ShowDialog(() => { SoundManager.PlayWith(audioSrc, SoundManager.Clip.SIGSEGV, () => { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }); }, new Tuple <string, string>("Pi", "Phew, that was close."), new Tuple <string, string>("David", "..."), new Tuple <string, string>("David", "I'm doomed."), new Tuple <string, string>("Pi", "You see, I'm actually immortal."), new Tuple <string, string>("Pi", "Even if you wanted to, you couldn't kill me."), new Tuple <string, string>("Pi", "Anyway, looks like you're kind of dead."), new Tuple <string, string>("Pi", "I'll take my leave. Goodbye.")); } } else { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); } } }
void Render() { if (timer < 2.0f) { } // Do nothing. else if (timer < 6.0f) { if (mode2) { if (!timepoints[4]) { title.text = ""; canvas.SetActive(true); timepoints[4] = true; } } else { if (!timepoints[0]) { SoundManager.Play(audioSrc, SoundManager.Clip.TRANSITION); title.text = "5 years later..."; timepoints[0] = true; } } } else if (timer < 9.0f) { if (mode2) { if (!timepoints[5]) { SoundManager.Play(audioSrc, SoundManager.Clip.TRANSITION); title.text = "To be continued"; timepoints[5] = true; } } else { if (!timepoints[1]) { canvas.SetActive(false); timepoints[1] = true; } } } else if (timer < 11.0f) { if (mode2) { SceneManager.LoadScene(0); } else { if (!timepoints[2]) { canvas.SetActive(false); timepoints[2] = true; } } } else { if (!timepoints[3]) { dialogManager.ShowDialog(() => { timer = 2.0f; mode2 = true; }, new Tuple <string, string>("David", "Five years ago, I almost died."), new Tuple <string, string>("David", "I will get my revenge, Pi...")); timepoints[3] = true; } } }