//--> Launch a new Voice Over private void newVoiceOver() { TextProperties textProperties = gameObject.GetComponent <TextProperties> (); //-> Add the entry in the diary if needed int managerID = textProperties.managerID; bool alreadyInDiary = false; if (textProperties.textList.r_Available(0, managerID)) { for (var i = 0; i < ingameGlobalManager.instance.currentPlayerDiaryList.Count; i++) { if (textProperties.managerID == ingameGlobalManager.instance.currentPlayerDiaryList [i]) { alreadyInDiary = true; break; } } if (!alreadyInDiary) { ingameGlobalManager.instance.currentPlayerDiaryList.Add(managerID); } } if (textProperties) { if (voiceOverManager) { voiceOverManager.setupNewVoice( textProperties.r_TextList(), textProperties.t_Language, textProperties.managerID, textProperties.r_TextList().voiceOverDescription(textProperties.t_Language, textProperties.managerID), textProperties.r_TextList().r_audioPriority(textProperties.t_Language, textProperties.managerID), alreadyInDiary); } } }
public IEnumerator I_newVoiceOver_WithID(int newID) { TextProperties textProperties = gameObject.GetComponent <TextProperties>(); //-> Add the entry in the diary if needed //int managerID = textProperties.managerID; bool alreadyInDiary = false; if (textProperties) { if (voiceOverManager) { voiceOverManager.setupNewVoice( textProperties.r_TextList(), textProperties.t_Language, textProperties.managerID, textProperties.r_TextList().voiceOverDescription(textProperties.t_Language, textProperties.managerID), textProperties.r_TextList().r_audioPriority(textProperties.t_Language, textProperties.managerID), alreadyInDiary); } } yield return(null); }