public IEnumerator Dialogue(int ID) { if (minutesLeft != 0) { minutesLeft -= 2; minutesText.text = "Minutes Left: " + minutesLeft.ToString(); player.GetComponent <PlayerController>().AssertMovement(false); string sentence = PlayerSheet.GetName(ID) + ": "; cutsceneText.text = ""; string statsString = "Stats: "; switch (PlayerSheet.GetIndex(ID) - 64) { case 0: statsString += "INFP\nIntrovert\nIntuitive\nFeeling\nProspecting"; break; case 1: statsString += "ENFP\nExtrovert\nIntuitive\nFeeling\nProspecting"; break; case 2: statsString += "ESTP\nExtrovert\nObservant\nThinking\nProspecting"; break; case 3: statsString += "ENTP\nExtrovert\nIntuitive\nThinking\nProspecting"; break; case 4: statsString += "ENTJ\nExtrovert\nIntuitive\nThinking\nJudging"; break; case 5: statsString += "ENFJ\nExtrovert\nIntuitive\nFeeling\nJudging"; break; case 6: statsString += "INTP\nIntrovert\nIntuitive\nThinking\nProspecting"; break; case 7: statsString += "INTJ\nIntrovert\nIntuitive\nThinking\nJudging"; break; case 8: statsString += "ESFP\nExtrovert\nObservant\nFeeling\nProspecting"; break; case 9: statsString += "ESFJ\nExtrovert\nObservant\nFeeling\nJudging"; break; case 10: statsString += "ISFP\nIntrovert\nObservant\nFeeling\nProspecting"; break; case 11: statsString += "ISFJ\nIntrovert\nObservant\nFeeling\nJudging"; break; case 12: statsString += "ISTJ\nIntrovert\nObservant\nThinking\nJudging"; break; case 13: statsString += "INFJ\nIntrovert\nIntuitive\nFeeling\nJudging"; break; case 14: statsString += "ISTP\nIntrovert\nObservant\nThinking\nProspecting"; break; case 15: statsString += "ESTJ\nExtrovert\nObservant\nThinking\nJudging"; break; } statsText.text = statsString; cutsceneObject.SetActive(true); // Normie if (PlayerSheet.GetIndex(ID) < 64) { cutsceneText.color = Color.white; if (PlayerSheet.GetParameter(ID, (int)ParameterType.Infected)) { PlayerSheet.SetParameter(ID, (int)ParameterType.Exposed, true); NPCs[ID].GetComponentInChildren <TextMesh>().color = infectedColor; sentence += "Haha, I heard you suck eggs!"; } else { int r = Random.Range(1, 100); if (r >= 75) { sentence += PlayerSheet.GetNormieDialogue(PlayerSheet.GetTypeOne(ID) - 1); } else { sentence += PlayerSheet.GetNormieDialogue(PlayerSheet.GetTypeTwo(ID) - 1); } } } else { cutsceneText.color = Color.yellow; statsWindow.SetActive(true); // if infected and not the spreader if (PlayerSheet.GetParameter(ID, (int)ParameterType.Infected) && PlayerSheet.GetIndex(ID) != distributorID) { NPCs[ID].GetComponentInChildren <TextMesh>().color = infectedFriend; PlayerSheet.SetParameter(ID, (int)ParameterType.Exposed, true); sentence += "Since we're friends, I want to let you know that someone told me about the eggs... But I promise I never told anyone!"; } // if uninfected else { sentence += PlayerSheet.GetFriendDialogue(PlayerSheet.GetIndex(ID)); } } int sound = 1; foreach (char c in sentence) { cutsceneText.text += c; yield return(new WaitForSeconds(.025f)); //play sound every other character if (sound % 6 == 0) { cutsceneNoise.SetActive(false); cutsceneNoise.SetActive(true); } sound++; } yield return(new WaitForSeconds(1.5f)); cutsceneText.text = ""; // friend options if (PlayerSheet.GetIndex(ID) >= 64 && minutesLeft != 0) { buttons.SetActive(true); if (PlayerSheet.GetParameter(ID, (int)ParameterType.Exposed)) { whoToldYouButton.SetActive(true); } tmpID = ID; } else { player.GetComponent <PlayerController>().AssertMovement(true); cutsceneObject.SetActive(false); } } dialogueRunning = false; yield return(null); }