Beispiel #1
0
 public InputModule(ConsoleInstance console)
     : base(console)
 {
     UserInput      = "";
     Cursor         = -1;
     m_HistoryIndex = -1;
 }
Beispiel #2
0
 public static void PlayMacro(ConsoleInstance console, Macro macro)
 {
     foreach (var command in macro.Queries)
     {
         console.Execute(command, false);
     }
 }
 public AConsoleCommand(ConsoleInstance console, string name, string description, bool isOption = false)
 {
     IsValid     = true;
     IsOption    = isOption;
     Console     = console;
     Name        = name.ToLowerInvariant();
     Description = description;
 }
Beispiel #4
0
        public static void CreateDefaultCommands(ConsoleInstance console)
        {
            console.AddCommand(new ClearHistoryCommand(console));
            console.AddCommand(new PrintCommand(console));
            console.AddCommand(new MacroManagerCommand(console));
            console.AddCommand(new ListCommand(console));

            console.AddCommand(new RepeatOption(console));
        }
Beispiel #5
0
        private static IEnumerator PlayMacroCoroutine(ConsoleInstance console, Macro macro, float delay)
        {
            foreach (var command in macro.Queries)
            {
                console.Execute(command, false);
                yield return(new WaitForSecondsRealtime(delay));
            }

            yield return(null);
        }
Beispiel #6
0
 public AConsoleCommand GetCommand(ConsoleInstance console)
 {
     if (Name.Parsed != null)
     {
         return(console.FindCommand(Name.Parsed as string));
     }
     else
     {
         return(console.FindCommand(Name.Value));
     }
 }
Beispiel #7
0
 public HistoryModule(ConsoleInstance console) : base(console)
 {
 }
Beispiel #8
0
 public MacroManagerCommand(ConsoleInstance console) : base(console, ELocKey.CmdMacroName, ELocKey.CmdMacroDesc)
 {
 }
Beispiel #9
0
 public AConsoleModule(ConsoleInstance console)
 {
     Console = console;
 }
Beispiel #10
0
 public void PlayMacroWithDelay(ConsoleInstance console, Macro macro, float delay) =>
 StartCoroutine(PlayMacroCoroutine(console, macro, delay));
Beispiel #11
0
 public HintProvider(ConsoleInstance console)
 {
     m_Console = console;
 }
Beispiel #12
0
 public MacroPlayerCommand(ConsoleInstance console, Macro macro) : base(console, macro.Name, console.Localization.Get(ELocKey.CmdMacroPlayerDesc))
 {
     m_Macro = macro;
 }
Beispiel #13
0
 public RepeatOption(ConsoleInstance console)
     : base(console, ELocKey.OptRepeatName, ELocKey.OptRepeatDesc, true)
 {
 }
 protected AConsoleCommand(ConsoleInstance console, ELocKey name, ELocKey description, bool isOption = false)
     : this(console, console.Localization.Get(name), console.Localization.Get(description), isOption)
 {
 }
Beispiel #15
0
 public MacroModule(ConsoleInstance console) : base(console)
 {
     NameHint = new MacroNameHint(this, m_Macros);
 }
Beispiel #16
0
 public ListCommand(ConsoleInstance console, bool isOption = false)
     : base(console, ELocKey.CmdListName, ELocKey.CmdListDesc, isOption)
 {
 }
Beispiel #17
0
 public HintModule(ConsoleInstance console) : base(console)
 {
     m_HintProvider = new HintProvider(console);
 }
Beispiel #18
0
 public DelayOption(ConsoleInstance console)
     : base(console, ELocKey.OptDelayName, ELocKey.OptDelayDesc, true)
 {
 }