EddiSpeechResponder.ScriptResolver.priority C# (CSharp) Метод

priority() публичный метод

public priority ( string name ) : int
name string
Результат int
        public int priority(string name)
        {
            Script script;
            scripts.TryGetValue(name, out script);
            return (script == null ? 5 : script.Priority);
        }

Usage Example

Пример #1
0
        // Say something with a custom resolver
        public void Say(ScriptResolver resolver, Ship ship, string scriptName, Event theEvent = null, int?priority = null, string voice = null, bool sayOutLoud = true, bool invokedFromVA = false)
        {
            Dictionary <string, Cottle.Value> dict = createVariables(theEvent);
            string speech = resolver.resolve(scriptName, dict);

            if (speech != null)
            {
                if (subtitles)
                {
                    // Log a tidied version of the speech
                    log(Regex.Replace(speech, "<.*?>", string.Empty));
                }
                if (sayOutLoud && !(subtitles && subtitlesOnly))
                {
                    SpeechService.Instance.Say(ship, speech, (priority == null ? resolver.priority(scriptName) : (int)priority), voice, false, theEvent?.type, invokedFromVA);
                }
            }
        }
All Usage Examples Of EddiSpeechResponder.ScriptResolver::priority