Exemple #1
0
    // Use this for initialization
    void Start()
    {
        //test code
        //UpdateInstructions(new List<string>() { "Turn on the tosti iron", "Check ingredients", "Spread butter on your bread", "Scrape the cheese", "Put cheese and ham on top of the butter",
        //"Place the bread in the sandwich iron", "Wait 6 minutes and you are done"});
        //end test code

        // Register buttons
        transform.Find("BtnNextFrame").GetComponent <ControlMenuButton>().OnClick     += StepForward;
        transform.Find("BtnPreviousFrame").GetComponent <ControlMenuButton>().OnClick += StepBackward;

        _voiceRecognizer = Instantiate(VoiceRecognizerPrefab).GetComponent <VoiceRecognizer>();
        _voiceRecognizer.RegisterKeyword("next");
        _voiceRecognizer.RegisterKeyword("previous");

        _voiceRecognizer.OnDictionaryReset += RegisterVoiceEvent;
        RegisterVoiceEvent();
    }
Exemple #2
0
    private void Awake()
    {
        VoiceOn = true;

        var cursor = Instantiate(CursorPrefab);

        cursor.transform.parent = Camera.main.transform;

        _guidance = Instantiate(GuidancePrefab).GetComponent <Guidance>();
        _guidance.transform.parent = Camera.main.transform;
        _guidance.GetComponent <Guidance>().SetInstruction("Say \"Menu\" to open the recipe menu");

        _voiceRecognizer = Instantiate(VoiceRecognizerPrefab).GetComponent <VoiceRecognizer>();
        _voiceRecognizer.RegisterKeyword("menu");
        _voiceRecognizer.RegisterKeyword("set timer");
        _voiceRecognizer.RegisterKeyword("add timer");

        _voiceRecognizer.OnDictionaryReset += RegisterVoiceEvent;
        RegisterVoiceEvent();
    }