public void CallEvents(string _key) { if (m_activationKey == _key) { m_dialogueEvent?.Invoke(); m_changedConditions.ToList().ForEach(e => DialoguesSettingsManager.SetConditionBoolValue(e.ConditionName, e.ConditionValue)); } }
/// <summary> /// Draw the Condiditions, Colors and Localisation Settings of <see cref="DialoguesSettingsManager.DialogsSettings"/> during play mode /// </summary> private void DrawPlayingSettings() { GUILayout.Label("CONDITIONS", m_titleStyle); for (int i = 0; i < m_conditionsPair.Count; i++) { GUILayout.BeginHorizontal(); GUILayout.Label(m_conditionsPair[i].Key, GUILayout.MinWidth(150), GUILayout.MaxWidth(200)); EditorGUI.BeginChangeCheck(); m_conditionsPair[i].Value = GUILayout.Toggle(m_conditionsPair[i].Value, "Current Value"); if (EditorGUI.EndChangeCheck()) { string _savedDatas = string.Empty; DialoguesSettingsManager.SetConditionBoolValue(m_conditionsPair[i].Key, m_conditionsPair[i].Value); m_dialogsSettings.LuaConditions = DialoguesSettingsManager.DialogsSettings.LuaConditions; } GUILayout.EndHorizontal(); } EditorGUILayout.HelpBox("Use this window to change the value of any condition", MessageType.Info); GUILayout.Space(15); GUILayout.Label("LOCALISATION KEYS - Text", m_titleStyle); EditorGUI.BeginChangeCheck(); m_dialogsSettings.CurrentLocalisationKeyIndex = EditorGUILayout.Popup("Current Localisation Key", m_dialogsSettings.CurrentLocalisationKeyIndex, m_dialogsSettings.LocalisationKeys); if (EditorGUI.EndChangeCheck()) { DialoguesSettingsManager.SetTextLocalisationKeyIndex(m_dialogsSettings.CurrentLocalisationKeyIndex); } GUILayout.Space(15); GUILayout.Label("LOCALISATION KEYS - Audio", m_titleStyle); EditorGUI.BeginChangeCheck(); m_dialogsSettings.CurrentAudioLocalisationKeyIndex = EditorGUILayout.Popup("Current Localisation Key", m_dialogsSettings.CurrentAudioLocalisationKeyIndex, m_dialogsSettings.AudioLocalisationKeys); if (EditorGUI.EndChangeCheck()) { DialoguesSettingsManager.SetAudioLocalisationKeyIndex(m_dialogsSettings.CurrentAudioLocalisationKeyIndex); } }