public EnemyHandling()
 {
     GameRecognizer.OnModifierRecognized += EnemyTargetingModifierRecognized;
     mobDrops            = new MobAsociatedDrops();
     stack               = new DropOutStack <ItemInsertion>(Configuration.undoHistoryLength);
     evnt                = new ManualResetEventSlim(false);
     masterMobRecognizer = new SpeechRecognitionEngine();
     masterMobRecognizer.SetInputToDefaultAudioDevice();
     masterMobRecognizer.SpeechRecognized += MasterMobRecognizer_SpeechRecognized;
     masterMobRecognizer.LoadGrammar(new Grammar(new Choices(Program.controlCommands.getRemoveTargetCommand)));
 }
Example #2
0
 public ChestRecognizer() : base()
 {
     helper  = new SpeechRecognitionHelper(this);
     stack   = new DropOutStack <ItemInsertion>(5);
     evnt    = new ManualResetEventSlim(false);
     numbers = new SpeechRecognitionEngine();
     numbers.SetInputToDefaultAudioDevice();
     numbers.SpeechRecognized += Numbers_SpeechRecognized;
     string[] strs = new string[201];
     for (int i = 0; i < strs.Length; i++)
     {
         strs[i] = i.ToString();
     }
     numbers.LoadGrammar(new Grammar(new Choices(strs)));
     mainRecognizer.LoadGrammar(new Grammar(new Choices(Program.controlCommands.getUndoCommand)));
     getCurrentGrammars.Add(Program.controlCommands.getUndoCommand, 2);
 }