Grotto scene added speech intents

dev
Nadine Ganz 2024-09-19 17:27:15 +02:00
parent eafeee13c5
commit cf3ff5a5d1
3 changed files with 372892 additions and 238483 deletions

View File

@ -1,16 +1,18 @@
Tree("Root") { Tree("Root") {
Composite(Sequence) { Composite(Sequence) {
BTC.InitializeSpeechManager()
//RunTree("32_Grotto_Kueche_Intro") //RunTree("32_Grotto_Kueche_Intro")
//RunTree("32_Grotto_Kueche_Zwiebeln_schneiden") //RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
// RunTree("32_Grotto_Kueche_alles_gefunden") RunTree("32_Grotto_Kueche_alles_gefunden")
//RunTree("32_Grotto_Kueche_Zusammen_Kochen") //RunTree("32_Grotto_Kueche_Zusammen_Kochen")
RunTree("32_Grotto_Chatbot_Test")
//RunTree("32_Grotto_Story_B_Grotto")
} }
} }
Tree("32_Grotto_Chatbot_Test") { Tree("32_Grotto_Story_B_Grotto") {
// --- Story B Grotto - Antwort Reise ---
Composite(Sequence) { Composite(Sequence) {
BTC.InitializeSpeechManager()
BTC.SynthesizeText("Ich möchte nirgends sonst auf der Welt leben. Möchtest du denn mit Francesca in der Küche etwas aushelfen oder wartest du im Garten auf sie?", "de-DE", "") BTC.SynthesizeText("Ich möchte nirgends sonst auf der Welt leben. Möchtest du denn mit Francesca in der Küche etwas aushelfen oder wartest du im Garten auf sie?", "de-DE", "")
BTC.SpeechOutputEnded() BTC.SpeechOutputEnded()
@ -23,74 +25,78 @@ Tree("32_Grotto_Chatbot_Test") {
BTC.StartSpeechIntentRecognition() BTC.StartSpeechIntentRecognition()
Composite(Race) { Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Sequence) { Composite(Sequence) {
BTC.UserStartedSpeechInput() BTC.UserStartedSpeechInput()
RunTree("32_Grotto_Chatbot_Test_Compare_Intent")
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.2")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
}
}
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
// --- Story B Grotto - Nachfrage Nonna Grotto ---
// SpeechIntentRecognized Failed: kein Intent erkannt
BTC.SynthesizeText("Was wolltest du sagen? Ich habe es nicht verstanden. Möchtest du mithelfen oder lieber im Garten warten?", "de-DE", "")
BTC.SpeechOutputEnded()
BTC.StartSpeechIntentRecognition()
// Fallback fehlt, wenn nichts gesagt wird
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.2")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
}
}
}
// Fallback 2mal nicht verstanden: Button klick
}
} }
// -- Race 2: User sagt nichts
Composite(Sequence) { Composite(Sequence) {
BTC.Wait(5) BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false) BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition() BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents() BTC.ClearPossbileSpeechIntents()
// Bilder Bergell // --- Bilder Bergell ---
//BTC.Run("LoadScene.NEXT.35Slideshow") //BTC.Run("LoadScene.NEXT.35Slideshow")
} }
} }
} }
} }
Tree("32_Grotto_Chatbot_Test_Compare_Intent") { Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche") {
// --- Story B Grotto - Antwort Nonna Kueche ---
Composite(Sequence) { Composite(Sequence) {
Composite(Selector) {
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.2")
RunTree("Antwort_Nonna_Kueche")
}
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.4")
RunTree("Antwort_Nonna_Grotto")
}
}
}
Composite(Sequence) {
// SpeechIntentRecognized Failed: kein Intent erkannt
BTC.SynthesizeText("Was wolltest du sagen? Ich habe es nicht verstanden. Möchtest du mithelfen oder lieber im Garten warten?", "de-DE", "")
BTC.SpeechOutputEnded()
BTC.StartSpeechIntentRecognition()
// Fallback fehlt, wenn nichts gesagt wird
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.2")
RunTree("Antwort_Nonna_Kueche")
}
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.4")
RunTree("Antwort_Nonna_Grotto")
}
}
}
// Fallback 2mal nicht verstanden: Button klick
}
}
}
Tree("Antwort_Nonna_Kueche") {
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
BTC.SynthesizeText("Oh, das ist wunderbar, vielen Dank! Anschliessend seid ihr selbstverständlich zum Essen eingeladen.", "de-DE", "") BTC.SynthesizeText("Oh, das ist wunderbar, vielen Dank! Anschliessend seid ihr selbstverständlich zum Essen eingeladen.", "de-DE", "")
BTC.SpeechOutputEnded() BTC.SpeechOutputEnded()
@ -99,38 +105,37 @@ Tree("Antwort_Nonna_Kueche") {
BTC.StartSpeechIntentRecognition() BTC.StartSpeechIntentRecognition()
Composite(Race) { Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) { Composite(Selector) {
Composite(Sequence) { Composite(Sequence) {
BTC.UserStartedSpeechInput() BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized() BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents() BTC.ClearPossbileSpeechIntents()
// --- Outro ---
//BTC.GetKeyDown("Return")
} }
// Intent nicht erkannt // Intent nicht erkannt
Composite(Sequence) { Composite(Sequence) {
BTC.ClearPossbileSpeechIntents() BTC.ClearPossbileSpeechIntents()
// --- Outro ---
//BTC.GetKeyDown("Return")
} }
} }
// -- Race 2: User sagt nichts
Composite(Sequence) { Composite(Sequence) {
BTC.Wait(5) BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false) BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition() BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents() BTC.ClearPossbileSpeechIntents()
// --- Outro ---
//BTC.GetKeyDown("Return")
} }
} }
// --- Story B Grotto - Outro ---
// ...
} }
} }
Tree("Antwort_Nonna_Grotto") { Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto") {
// --- Story B Grotto - Antwort Nonna Grotto ---
Composite(Sequence) { Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
BTC.SynthesizeText("Okay gut, mach es dir gemütlich. Hast du etwas zum Lesen dabei?", "de-DE", "") BTC.SynthesizeText("Okay gut, mach es dir gemütlich. Hast du etwas zum Lesen dabei?", "de-DE", "")
BTC.SpeechOutputEnded() BTC.SpeechOutputEnded()
@ -139,32 +144,28 @@ Tree("Antwort_Nonna_Grotto") {
BTC.StartSpeechIntentRecognition() BTC.StartSpeechIntentRecognition()
Composite(Race) { Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) { Composite(Selector) {
Composite(Sequence) { Composite(Sequence) {
BTC.UserStartedSpeechInput() BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized() BTC.SpeechIntentRecognized()
RunTree("Antwort_Nonna_Grotto_2") BTC.ClearPossbileSpeechIntents()
} }
// Intent nicht erkannt // Intent nicht erkannt
Composite(Sequence) { Composite(Sequence) {
RunTree("Antwort_Nonna_Grotto_2") BTC.ClearPossbileSpeechIntents()
} }
} }
// -- Race 2: User sagt nichts
Composite(Sequence) { Composite(Sequence) {
BTC.Wait(5) BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false) BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition() BTC.StopSpeechIntentRecognition()
RunTree("Antwort_Nonna_Grotto_2") BTC.ClearPossbileSpeechIntents()
} }
} }
}
}
Tree("Antwort_Nonna_Grotto_2") {
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
BTC.SynthesizeText("Prima, viel Spass noch und dann guten Appetit!", "de-DE", "") BTC.SynthesizeText("Prima, viel Spass noch und dann guten Appetit!", "de-DE", "")
BTC.SpeechOutputEnded() BTC.SpeechOutputEnded()
@ -174,6 +175,7 @@ Tree("Antwort_Nonna_Grotto_2") {
BTC.StartSpeechIntentRecognition() BTC.StartSpeechIntentRecognition()
Composite(Race) { Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) { Composite(Selector) {
Composite(Sequence) { Composite(Sequence) {
BTC.UserStartedSpeechInput() BTC.UserStartedSpeechInput()
@ -189,6 +191,7 @@ Tree("Antwort_Nonna_Grotto_2") {
} }
} }
// -- Race 2: User sagt nichts
Composite(Sequence) { Composite(Sequence) {
BTC.Wait(5) BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false) BTC.CompareUserSpeechInputStarted(false)
@ -201,6 +204,7 @@ Tree("Antwort_Nonna_Grotto_2") {
} }
Tree("32_Grotto_Kueche_Intro") { Tree("32_Grotto_Kueche_Intro") {
// --- Kueche - Intro ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche1FIntro") BTC.Run("AudioSource.AUDIO.Kueche1FIntro")
@ -244,6 +248,7 @@ Tree("32_Grotto_Kueche_Intro") {
Composite(Sequence) { Composite(Sequence) {
// Keine Reaction // Keine Reaction
BTC.Wait(5) BTC.Wait(5)
// --- Kueche - Steinpilze Hilfe ---
BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze") BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze")
// Pilze ins Wasser Glas legen // Pilze ins Wasser Glas legen
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze") BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")
@ -256,6 +261,7 @@ Tree("32_Grotto_Kueche_Intro") {
} }
Tree("32_Grotto_Kueche_Zwiebeln_schneiden") { Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
// --- Kueche - Zwiebeln schneiden ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc") BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc")
@ -365,62 +371,140 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
Tree("32_Grotto_Kueche_alles_gefunden") { Tree("32_Grotto_Kueche_alles_gefunden") {
// --- Kueche - alles gefunden ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun") // Audio fehlt BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun") // Audio fehlt
// Oel in Topf geben - Particle Trigger // Oel in Topf geben - Particle Trigger
// ... // ...
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun") BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun")
BTC.GetKeyDown("Return")
// Zwiebeln in Topf geben // Zwiebeln in Topf geben
BTC.Run("NamedGrabEvent.INTERACTABLES.Zwiebeln") /* BTC.Run("NamedGrabEvent.INTERACTABLES.Zwiebeln")
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln") BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln")
BTC.Run("Collider.INTERACTABLES.Topf") BTC.Run("Collider.INTERACTABLES.Topf")
BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun") BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun")*/
// Frage beantworten // Frage beantworten
Composite(Marathon) { BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.4", "Ja.")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja") BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.6", "Nein.")
BTC.Show("GO.HANDMENU.Option1Button") BTC.StartSpeechIntentRecognition()
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) { Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Sequence) { Composite(Sequence) {
// Ja BTC.UserStartedSpeechInput()
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button") Composite(Selector) {
BTC.Hide("GO.HANDMENU.Option2Button") // -- Selector 1: Intent erkannt
RunTree("32_Grotto_Kueche_Interesse_Kochen") Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.6")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
}
} }
// -- Race 2: User sagt nichts
Composite(Sequence) { Composite(Sequence) {
// Nein BTC.Wait(5)
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button") BTC.CompareUserSpeechInputStarted(false)
BTC.Hide("GO.HANDMENU.Option1Button") BTC.StopSpeechIntentRecognition()
BTC.Hide("GO.HANDMENU.Option2Button") BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
} }
} }
} }
} }
Tree("32_Grotto_Kueche_Interesse_Kochen") { Tree("32_Grotto_Kueche_Interesse_Kochen") {
// --- Kueche - Interesse Kochen ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche1FInteresseK") BTC.Run("AudioSource.AUDIO.Kueche1FInteresseK")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Lasagne") BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Lasagne")
BTC.Show("GO.HANDMENU.Option1Button") BTC.Show("GO.HANDMENU.Option1Button")
BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
Composite(Race) { Composite(Race) {
Composite(Sequence) { Composite(Sequence) {
// Lieblingsessen nennen // Lieblingsessen nennen
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button") //BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.GetKeyDown("Return")
BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked")
BTC.Hide("GO.HANDMENU.Option1Button")
RunTree("32_Grotto_Kueche_Kochen_Anzahl") RunTree("32_Grotto_Kueche_Kochen_Anzahl")
} }
Composite(Sequence) { Composite(Sequence) {
// keine Antwort // keine Antwort
BTC.Wait(5) BTC.Wait(5)
BTC.CompareBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
BTC.Hide("GO.HANDMENU.Option1Button")
RunTree("32_Grotto_Kueche_Zusammen_Kochen") RunTree("32_Grotto_Kueche_Zusammen_Kochen")
} }
} }
@ -428,37 +512,78 @@ Tree("32_Grotto_Kueche_Interesse_Kochen") {
} }
Tree("32_Grotto_Kueche_Kochen_Anzahl") { Tree("32_Grotto_Kueche_Kochen_Anzahl") {
// --- Kueche - Kochen Anzahl ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche1FKochenAnza") BTC.Run("AudioSource.AUDIO.Kueche1FKochenAnza")
// Frage beantworten // Frage beantworten
Composite(Marathon) { BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.2", "sehr oft, fast täglich (oder andere Antwort)")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "sehr oft") BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.4", "fast nie (oder andere Antwort)")
BTC.Show("GO.HANDMENU.Option1Button") BTC.StartSpeechIntentRecognition()
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "selten")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) { Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Sequence) { Composite(Sequence) {
// sehr oft BTC.UserStartedSpeechInput()
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button") Composite(Selector) {
BTC.Hide("GO.HANDMENU.Option2Button") // -- Selector 1: Intent erkannt
RunTree("32_Grotto_Kueche_Selbststaendig_Kochen") Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Kueche.Kochen_Anzahl.2")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Selbststaendig_Kochen")
}
Composite(Sequence) {
BTC.CompareIntentID("Kueche.Kochen_Anzahl.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "sehr oft")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "selten")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// sehr oft
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Selbststaendig_Kochen")
}
Composite(Sequence) {
// selten
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
}
} }
// -- Race 2: User sagt nichts
Composite(Sequence) { Composite(Sequence) {
// selten
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
Composite(Sequence) {
// keine Antwort
BTC.Wait(5) BTC.Wait(5)
BTC.Hide("GO.HANDMENU.Option1Button") BTC.CompareUserSpeechInputStarted(false)
BTC.Hide("GO.HANDMENU.Option2Button") BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Zusammen_Kochen") RunTree("32_Grotto_Kueche_Zusammen_Kochen")
} }
} }
@ -466,6 +591,7 @@ Tree("32_Grotto_Kueche_Kochen_Anzahl") {
} }
Tree("32_Grotto_Kueche_Zusammen_Kochen") { Tree("32_Grotto_Kueche_Zusammen_Kochen") {
// --- Kueche - Zusammen Kochen ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche1FZusammenKo") BTC.Run("AudioSource.AUDIO.Kueche1FZusammenKo")
@ -514,6 +640,7 @@ Tree("32_Grotto_Kueche_Zusammen_Kochen") {
} }
Tree("32_Grotto_Kueche_Selbststaendig_Kochen") { Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
// --- Kueche - Selbststaendig Kochen ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche1FSelbststae") BTC.Run("AudioSource.AUDIO.Kueche1FSelbststae")
// Selbstaendig kochen... // Selbstaendig kochen...
@ -524,6 +651,7 @@ Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
} }
Tree("32_Grotto_Kueche_Parmigiano") { Tree("32_Grotto_Kueche_Parmigiano") {
// --- Kueche - Parmigiano ---
Composite(Sequence) { Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo") BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo")
@ -557,18 +685,48 @@ Tree("32_Grotto_Kueche_Parmigiano") {
BTC.Run("AudioSource.AUDIO.Kueche5FZusammenKo") BTC.Run("AudioSource.AUDIO.Kueche5FZusammenKo")
BTC.Run("AudioSource.AUDIO.Kueche6FZusammenKo") BTC.Run("AudioSource.AUDIO.Kueche6FZusammenKo")
// --- Outro --- // --- Kueche - Outro ---
BTC.Run("AudioSource.AUDIO.Kueche1GOutro") BTC.Run("AudioSource.AUDIO.Kueche1GOutro")
BTC.Run("AudioSource.AUDIO.Kueche2GOutro") BTC.Run("AudioSource.AUDIO.Kueche2GOutro")
// Name sagen // Name sagen
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Mein Name ist User.") BTC.AddPossbileSpeechIntent("Kueche.Outro.4", "Mein Name ist xy.")
BTC.Show("GO.HANDMENU.Option1Button") BTC.StartSpeechIntentRecognition()
Composite(Race) { Composite(Race) {
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button") // -- Race 1: User sagt etwas
BTC.Wait(5) 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()
// Fallback Button
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Mein Name ist User.")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
}
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
} }
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Run("AudioSource.AUDIO.Kueche3GOutro") BTC.Run("AudioSource.AUDIO.Kueche3GOutro")
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -140,9 +140,6 @@ PlayerSettings:
bundleVersion: 0.1 bundleVersion: 0.1
preloadedAssets: preloadedAssets:
- {fileID: 11400000, guid: be340e3c48769439d8d18a5a2bccd498, type: 2} - {fileID: 11400000, guid: be340e3c48769439d8d18a5a2bccd498, type: 2}
- {fileID: 11400000, guid: bfa1182bd221b4ca89619141f66f1260, type: 2}
- {fileID: -8196854396901781169, guid: 1a4c68ca72a83449f938d669337cb305, type: 2}
- {fileID: -64324148185763206, guid: a9a6963505ddf7f4d886008c6dc86122, type: 2}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1