IEnumerator PrintText(Player.Death deathType) { DeathPatern actualPatern = deathNote[deathType]; player.ResetPosition(); yield return(new WaitForSeconds(WAIT_AT_START)); foreach (char c in actualPatern.deathDescription) { deathExplanation.text += c; yield return(new WaitForSeconds(SHORT_DELTA_TIME)); if (c == '.' || c == '!' || c == '?' || c == ';' || c == '\n') { yield return(new WaitForSeconds(LONG_DELTA_TIME)); } else if (c == ',') { yield return(new WaitForSeconds(DELTA_TIME)); } } deathPowerTitle.SetActive(true); image.sprite = powerIcone.GetImage(deathType); image.gameObject.SetActive(true); deathPowerExplanation.text = actualPatern.deathPowerDescription; nextText.SetActive(true); next = false; while (!next) { yield return(new WaitForSeconds(SHORT_DELTA_TIME)); } things.SetActive(false); player.isTalking = false; }
public DeathScreenPatern() { deathType = Player.Death.barbecue; deathDescription = new DeathPatern(); }
public DeathScreenPatern(Player.Death deathTypeIn, DeathPatern deathDescriptionIn) { deathType = deathTypeIn; deathDescription = deathDescriptionIn; }