Example #1
0
        void Start()
        {
            upperHandle = GetComponent <UpperHandle>();
            lowerHandle = GetComponent <LowerHandle>();
            lineDraw    = GameObject.Find("Panto").GetComponent <LineDraw>();
            Debug.Log("Before Introduction");
            speechIn.StartListening(keywords.Keys.ToArray());


            level1 = GameObject.Find("Level1");
            level1.SetActive(false);

            level2 = GameObject.Find("Level2");
            level2.SetActive(false);

            level4 = GameObject.Find("Level4");
            level4.SetActive(false);

            RegisterColliders();
            if (levelMode)
            {
                Debug.Log(levelMode);
                Levels();
            }
            else
            {
                lineDraw.canDraw = true;
            }
        }
Example #2
0
        // Start is called before the first frame update
        public override async Task StartLevel(LineDraw lineDraw, SpeechIn speechIn, SpeechOut speechOut)
        {
            await speechOut.Speak("Now you have an empty paper, draw your own face. Feel free to use the options command for all tools.");

            lineDraw.canDraw = true;
            await speechOut.Speak("Say yes when you're ready.");

            await WaitFunction(ready);

            lineDraw.canDraw = false;
            speechOut.Speak("Congratulations! You completed your first own drawing!");
        }
Example #3
0
        // Start is called before the first frame update
        public override async Task StartLevel(LineDraw lineDraw, SpeechIn speechIn, SpeechOut speechOut)
        {
            await speechOut.Speak("Now you can find your Mouth and the two Eyes in the picture. Draw a nose in the right spot");

            await speechOut.Speak("Use the voice commands Mouth, Eye, 0 and 1 and see whats happening.");

            lineDraw.canDraw = true;
            await speechOut.Speak("Can you find your drawn nose? Say yes when you're ready.");

            await WaitFunction(ready);

            lineDraw.canDraw = false;
            await lineDraw.TraceLine(lineDraw.lines["line" + (lineDraw.lineCount - 1)]);
        }
Example #4
0
        // Start is called before the first frame update
        public override async Task StartLevel(LineDraw lineDraw, SpeechIn speechIn, SpeechOut speechOut)
        {
            await speechOut.Speak("Here you can find the first half of a face.");

            LineRenderer face = GameObject.Find("Face").GetComponent <LineRenderer>();

            GameObject.Find("Panto").GetComponent <GameManager>().AddVoiceCommand("Face", () =>
            {
                lineDraw.TraceLine(face);
            });
            await speechOut.Speak("Draw the second half.");

            lineDraw.canDraw = true;
            await speechOut.Speak("Say yes when you're ready.");

            await WaitFunction(ready);

            lineDraw.canDraw = false;
            await speechOut.Speak("Congrats you just drew a face!");
        }
Example #5
0
        // Start is called before the first frame update
        public override async Task StartLevel(LineDraw lineDraw, SpeechIn speechIn, SpeechOut speechOut)
        {
            await speechOut.Speak("Welcome to Panto Drawing");

            await speechOut.Speak("Explore your drawing area. Say yes when you're ready.");

            Debug.Log(drawn);
            await WaitFunction(ready);

            Debug.Log(drawn);
            await speechOut.Speak("Lets make your first drawing.");

            LineRenderer mouth = GameObject.Find("Mouth").GetComponent <LineRenderer>();

            GameObject.Find("Panto").GetComponent <GameManager>().AddVoiceCommand("Mouth", () =>
            {
                lineDraw.TraceLine(mouth);
            });

            await speechOut.Speak("Here you can feel the first half of a mouth.");

            await lineDraw.TraceLine(mouth);

            await speechOut.Speak("Draw the second half. Turn the upper Handle to start drawing.");

            lineDraw.FindStartingPoint(mouth);
            lineDraw.canDraw = true;
            await speechOut.Speak("Say yes when you're ready.");

            Debug.Log(drawn);
            await WaitFunction(ready);

            Debug.Log(drawn);
            lineDraw.canDraw = false;
            LineRenderer secondMouth = lineDraw.lines["line" + (lineDraw.lineCount - 1)];

            lineDraw.CombineLines(mouth, secondMouth, true); //they will be both one line in "Mouth", invert the second line
            await lineDraw.TraceLine(mouth);
        }
Example #6
0
        // Start is called before the first frame update
        public override async Task StartLevel(LineDraw lineDraw, SpeechIn speechIn, SpeechOut speechOut)
        {
            LineRenderer eye = GameObject.Find("Eye").GetComponent <LineRenderer>();

            GameObject.Find("Panto").GetComponent <GameManager>().AddVoiceCommand("Eye", () =>
            {
                lineDraw.TraceLine(eye);
            });
            lineDraw.TraceLine(eye);
            await speechOut.Speak("Here you can feel a human eye.");

            await speechOut.Speak("Draw the second eye now.");

            lineDraw.canDraw = true;
            await speechOut.Speak("Say circle when you're ready, then yes.");

            await WaitFunction(ready);

            lineDraw.canDraw = false;
            LineRenderer secondEye = lineDraw.lines["line" + (lineDraw.lineCount - 1)];

            await lineDraw.TraceLine(secondEye);
        }
Example #7
0
 public abstract Task StartLevel(LineDraw lineDraw, SpeechIn speechIn, SpeechOut speechOut);
Example #8
0
 // Start is called before the first frame update
 public override async Task StartLevel(LineDraw lineDraw, SpeechIn speechIn, SpeechOut speechOut)
 {
     await speechOut.Speak("Turn the upper handle to start drawing, use the options command for all available functions. After drawing a line you can find it too.");
 }