Created
February 12, 2017 15:16
-
-
Save flushpot1125/ead4990d4c497494fdf9d0f4cb5ed540 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delegate void KeywordAction(PhraseRecognizedEventArgs args); | |
Dictionary<string, KeywordAction> keywordCollection; | |
void Start() | |
{ | |
keywordCollection = new Dictionary<string, KeywordAction>(); | |
// Add keyword to start manipulation. | |
// keywordCollection.Add("Move Astronaut", MoveAstronautCommand); | |
keywordCollection.Add("Move", MoveAstronautCommand); | |
/* TODO: DEVELOPER CODING EXERCISE 5.a */ | |
// 5.a: Add keyword Expand Model to call the ExpandModelCommand function. | |
keywordCollection.Add("Expand Model", ExpandModelCommand); | |
// 5.a: Add keyword Reset Model to call the ResetModelCommand function. | |
keywordCollection.Add("Reset Model", ResetModelCommand); | |
// Initialize KeywordRecognizer with the previously added keywords. | |
keywordRecognizer = new KeywordRecognizer(keywordCollection.Keys.ToArray()); | |
keywordRecognizer.OnPhraseRecognized += KeywordRecognizer_OnPhraseRecognized; | |
keywordRecognizer.Start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment