private string internal_getPhrase(int index, SessionLogic.PersonType type) { if (lastGeneratedPhrases == null) { lastGeneratedPhrases = new Dictionary <string, string>(); internal_generatePhrases(); } return(lastGeneratedPhrases["line" + (type == SessionLogic.PersonType.Female ? "F" : type == SessionLogic.PersonType.Male ? "M" : "D") + index]); }
private IEnumerator HandleQuestionButtonClick(int index) { leftPlayButton.GetComponent<Animator>().SetTrigger("disappear"); rightPlayButton.GetComponent<Animator>().SetTrigger("disappear"); bool correct = SessionLogic.HandleSelection(index); if (correct) { if (index == 0) { leftCharacter.EmitLove(); } else { rightCharacter.EmitLove(); } } if (index == 0) leftCharacter.Talk = true; else if (index == 1) rightCharacter.Talk = true; SessionLogic.PersonType type = SessionLogic.GetPersonType(index); if (type == SessionLogic.PersonType.Male) yield return new WaitForSeconds(MaleClientSpeechWaitTime); else yield return new WaitForSeconds(FemaleClientSpeechWaitTime); if (index == 0) leftCharacter.Talk = false; else if (index == 1) rightCharacter.Talk = false; if (SessionLogic.HasSessionEnded()) { StartCoroutine(ChangeState(GameState.PlaySessionEnded)); } else { yield return new WaitForSeconds(1); WindowsVoice.getInstance().speak("You", SessionLogic.GetDoctorPrefix(), PhraseGenerator.getDoctorPhrase()); yield return new WaitForSeconds(DoctorSpeechWaitTime); leftPlayButton.GetComponent<Animator>().SetTrigger("appear"); rightPlayButton.GetComponent<Animator>().SetTrigger("appear"); yield return new WaitForSeconds(0.5f); } }
public static string getPhrase(int index, SessionLogic.PersonType type) { return(instance.internal_getPhrase(index, type)); }