Tree("Root") { Composite(Sequence) { BTC.InitializeSpeechManager() BTC.SetSpeechRecognitionLanguage("it-IT") BTC.SetVoiceName("it-IT-IsabellaMultilingualNeural") Composite(Race) { Composite(Sequence) { // Error in Speech Service: Cancel BTC Trees BTC.SpeechErrorOccured() BTC.SetBool("error") } Composite(Sequence) { RunTree("26_Castello_Castelli_di_Bellinzona_Intro") //RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli") } } Composite(Sequence) { BTC.CompareBool("error") // Error Handling BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() BTC.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart") BTC.Show("GO.GO.Option1Button") BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") } } } Tree("26_Castello_Castelli_di_Bellinzona_Intro") { // --- Castelli di Bellinzona - Intro --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.Intro1CastellidiBe") BTC.Run("Depthkit.VIDEOS.Intro1CastellidiBe") BTC.Hide("Depthkit.VIDEOS.Intro1CastellidiBe") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Intro.2") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() BTC.ClearPossbileSpeechIntents() } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(10) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() } } BTC.Show("Depthkit.VIDEOS.Intro5CastellidiBe") BTC.Run("Depthkit.VIDEOS.Intro5CastellidiBe") BTC.Hide("Depthkit.VIDEOS.Intro5CastellidiBe") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Intro.6") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Intro.7") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() Composite(Race) { Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Intro.6") BTC.ClearPossbileSpeechIntents() // Warten bis User Foto macht BTC.Run("NamedEventTrigger.GO.CameraButton") } Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Intro.7") BTC.ClearPossbileSpeechIntents() } } } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() // Fallback Button Composite(Marathon) { BTC.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Sì.") BTC.Show("GO.GO.Option1Button") BTC.Set("TextMeshPro.GO.Option2Button", "text", "No.") BTC.Show("GO.GO.Option2Button") } Composite(Race) { Composite(Sequence) { // Ja BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") // Warten bis User Foto macht BTC.Run("NamedEventTrigger.GO.CameraButton") } Composite(Sequence) { // Nein BTC.Run("NamedEventTrigger.GO.Option2Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") } } } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(10) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() } } BTC.Show("Depthkit.VIDEOS.Intro10CastellidiB") BTC.Run("Depthkit.VIDEOS.Intro10CastellidiB") BTC.Hide("Depthkit.VIDEOS.Intro10CastellidiB") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Intro.11") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Intro.12") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() BTC.ClearPossbileSpeechIntents() } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() } } BTC.Show("Depthkit.VIDEOS.Intro15CastellidiB") BTC.Run("Depthkit.VIDEOS.Intro15CastellidiB") BTC.Hide("Depthkit.VIDEOS.Intro15CastellidiB") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Intro.16") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Intro.18") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() Composite(Race) { Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Intro.16") BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli") } Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Intro.18") BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() // Fallback Button Composite(Marathon) { BTC.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Sì.") BTC.Show("GO.GO.Option1Button") BTC.Set("TextMeshPro.GO.Option2Button", "text", "No.") BTC.Show("GO.GO.Option2Button") } Composite(Race) { Composite(Sequence) { // Ja BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli") } Composite(Sequence) { // Nein BTC.Run("NamedEventTrigger.GO.Option2Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } } Tree("26_Castello_Castelli_di_Bellinzona_Chatbot_Init") { // Initialization Composite(Marathon) { BTC.SetPosition("GO.XRInteractionHandsSetup.XROrigin", 52.99, 0, 20.4) BTC.SetPosition("GO.HANDMENU", 52.99, 0, 20.4) BTC.RotateToAngle("GO.XRInteractionHandsSetup.XROrigin", 90.0) BTC.RotateToAngle("GO.HANDMENU", 90.0) } } Tree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli") { // --- Castelli di Bellinzona - Geschichte Castelli --- Composite(Sequence) { RunTree("26_Castello_Castelli_di_Bellinzona_Chatbot_Init") BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_01") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_01") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_01") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Geschichte_Castelli.2") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() BTC.ClearPossbileSpeechIntents() } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() } } BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_05") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_05") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_05") BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_06") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_06") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_06") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Geschichte_Castelli.7") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Geschichte_Castelli.9") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() Composite(Race) { Composite(Sequence) { // User weiss es nicht BTC.CompareIntentID("Castelli_di_Bellinzona.Geschichte_Castelli.7") BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_Chatbot_Burgen") } Composite(Sequence) { // User weiss Antwort BTC.CompareIntentID("Castelli_di_Bellinzona.Geschichte_Castelli.9") BTC.ClearPossbileSpeechIntents() BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_10") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_10") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_10") // --- Castelli di Bellinzona - Geschichte Castelli Bot1 --- BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_Bot1_01") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_Bot1_01") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_Bot1_01") RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") } } } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_Chatbot_Burgen") } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_Chatbot_Burgen") } } } } Tree("26_Castello_Castelli_di_Bellinzona_Chatbot_Burgen") { // --- Castelli di Bellinzona - Chatbot Burgen --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.ChatbotBurgen1Cast") BTC.Run("Depthkit.VIDEOS.ChatbotBurgen1Cast") BTC.Hide("Depthkit.VIDEOS.ChatbotBurgen1Cast") BTC.Show("Depthkit.VIDEOS.ChatbotBurgen2Cast") BTC.Run("Depthkit.VIDEOS.ChatbotBurgen2Cast") BTC.Hide("Depthkit.VIDEOS.ChatbotBurgen2Cast") BTC.SynthesizeText("Per proteggere la città dagli attacchi nemici. Vuoi saperne di più?") BTC.SpeechOutputEnded() BTC.Show("Depthkit.VIDEOS.ChatbotBurgen4Cast") BTC.Run("Depthkit.VIDEOS.ChatbotBurgen4Cast") BTC.Hide("Depthkit.VIDEOS.ChatbotBurgen4Cast") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Chatbot_Burgen.5") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Chatbot_Burgen.7") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() Composite(Race) { Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Chatbot_Burgen.5") BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") } Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Chatbot_Burgen.7") BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() // Fallback Button Composite(Marathon) { BTC.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Sì.") BTC.Show("GO.GO.Option1Button") BTC.Set("TextMeshPro.GO.Option2Button", "text", "No.") BTC.Show("GO.GO.Option2Button") } Composite(Race) { Composite(Sequence) { // Ja BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") } Composite(Sequence) { // Nein BTC.Run("NamedEventTrigger.GO.Option2Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") } } } } Tree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_Bot") { // --- Castelli di Bellinzona - Geschichte Castelli Bot --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_Bot1_02") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_Bot1_02") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_Bot1_02") BTC.SynthesizeText("La valle veniva chiusa costruendo la cinta muraria della città e la Murata. In questo modo nessuno poteva attraversare i passi alpini del Gottardo, del San Bernardino, della Novena e del Lucomagno. Bellinzona si trovava su un'importante via commerciale tra il nord e il sud dell'Europa.") BTC.SpeechOutputEnded() BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_Bot_02") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_Bot_02") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_Bot_02") BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_Bot_03") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_Bot_03") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_Bot_03") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Geschichte_Castelli_Bot.4") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Geschichte_Castelli_Bot.6") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() Composite(Race) { Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Geschichte_Castelli_Bot.4") BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_weitererzaehlen") } Composite(Sequence) { BTC.CompareIntentID("Castelli_di_Bellinzona.Geschichte_Castelli_Bot.6") BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() // Fallback Button Composite(Marathon) { BTC.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Sì.") BTC.Show("GO.GO.Option1Button") BTC.Set("TextMeshPro.GO.Option2Button", "text", "No.") BTC.Show("GO.GO.Option2Button") } Composite(Race) { Composite(Sequence) { // Ja BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_weitererzaehlen") } Composite(Sequence) { // Nein BTC.Run("NamedEventTrigger.GO.Option2Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") } } } } Tree("26_Castello_Castelli_di_Bellinzona_KI_Audio_Chat_Castelli") { // --- Castelli di Bellinzona - KI Audio Chat Castelli --- Composite(Sequence) { //RunTree("26_Castello_Castelli_di_Bellinzona_Chatbot_Init") BTC.GetKeyDown("Return") } } Tree("26_Castello_Castelli_di_Bellinzona_Geschichte_Castelli_weitererzaehlen") { // --- Castelli di Bellinzona - Geschichte Castelli weitererzaehlen --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_01") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_01") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_01") BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_02") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_02") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_02") BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_03") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_03") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_03") Composite(Race) { Composite(Sequence) { // User stellt Chatbot eine Frage // TODO: Button Chatbot starten drücken // ... Tree? BTC.GetKeyDown("Return") } Composite(Sequence) { // User fragt nichts BTC.Wait(10) // TODO: Check, ob Button gedrueckt worden ist - wenn ja, fail BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_07") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_07") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_07") // TODO: Chatbot antwortet BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_08") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_08") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_08") Composite(Race) { Composite(Sequence) { // User stellt Chatbot eine Frage // TODO: Button Chatbot starten drücken // ... Tree? BTC.GetKeyDown("Return") } Composite(Sequence) { // User fragt 2tes Mal nichts BTC.Wait(10) // TODO: Check, ob Button gedrueckt worden ist - wenn ja, fail BTC.Show("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_12") BTC.Run("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_12") BTC.Hide("Depthkit.VIDEOS.GeschichteCastelli_weitererzaehlen_12") BTC.AddPossbileSpeechIntent("Castelli_di_Bellinzona.Geschichte_Castelli_weitererzaehlen.13") BTC.StartSpeechIntentRecognition() Composite(Race) { // -- Race 1: User sagt etwas Composite(Sequence) { BTC.UserStartedSpeechInput() Composite(Selector) { // -- Selector 1: Intent erkannt Composite(Sequence) { BTC.SpeechIntentRecognized() BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Hide") } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Hide") } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(10) BTC.CompareUserSpeechInputStarted(false) // TODO: Check, ob Button gedrueckt worden ist - wenn ja, fail BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() RunTree("26_Castello_Hide") } // -- Race 3: User startet Chatbot Composite(Sequence) { // TODO: Button Chatbot starten drücken BTC.GetKeyDown("Return") BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() // ... Tree? } } } } } } } } Tree("26_Castello_Hide") { Composite(Sequence) { // Go to scene 2.7 Slideshow BTC.SetStoryAVisited() BTC.Run("LoadScene.NEXT.27Slideshow") } }