Example #1
0
        private static List<BmlBehaviour> GetBehaviour(XmlNode parentNode)
        {
            List<BmlBehaviour> behaviourList = new List<BmlBehaviour>();

            foreach (XmlNode node in parentNode.ChildNodes)
            {
                if (node.Name == "speech")
                {
                    // speech
                    Speech speech = new Speech(node);
                    behaviourList.Add(speech);
                }
                else if (node.Name == "wait")
                {
                    // wait
                    Wait wait = new Wait(node);
                    behaviourList.Add(wait);

                }
                else if (node.Name == "gesture")
                {
                    // gesture
                    Gesture gesture = new Gesture(node);
                    behaviourList.Add(gesture);
                }
                else if (node.Name == "head")
                {
                    // head
                    Head head = new Head(node);
                    behaviourList.Add(head);
                }
                else if (node.Name == "headDirectionShift")
                {
                    // head
                    HeadDirectionShift headDirectionShift = new HeadDirectionShift(node);
                    behaviourList.Add(headDirectionShift);
                }
                else if (node.Name == "faceLexeme")
                {
                    // faceLexeme
                    FaceLexeme faceLexeme = new FaceLexeme(node);
                    behaviourList.Add(faceLexeme);
                }
                else if (node.Name == "ext:faceFacs")
                {
                    // faceFacs
                    FaceFacs faceFacs = new FaceFacs(node);
                    behaviourList.Add(faceFacs);
                }
                else if (node.Name == "face")
                {
                    // face
                    Face face = new Face(node);
                    behaviourList.Add(face);
                }
                else if (node.Name == "faceShift")
                {
                    // faceShift
                    FaceShift faceShift = new FaceShift(node);
                    behaviourList.Add(faceShift);
                }
                else if (node.Name == "gaze")
                {
                    // gaze
                    Gaze gaze = new Gaze(node);
                    behaviourList.Add(gaze);
                }
                else if (node.Name == "gazeShift")
                {
                    // gaze
                    GazeShift gazeShift = new GazeShift(node);
                    behaviourList.Add(gazeShift);
                }

            }

            return behaviourList;
        }
Example #2
0
 private void StartSpeechBehaviour(Speech behaviour, float playbackTime)
 {
     WindowsVoice.Speak(behaviour.Text);
 }