Grotto scene added speech intents
parent
eafeee13c5
commit
cf3ff5a5d1
|
@ -1,16 +1,18 @@
|
|||
Tree("Root") {
|
||||
Composite(Sequence) {
|
||||
BTC.InitializeSpeechManager()
|
||||
//RunTree("32_Grotto_Kueche_Intro")
|
||||
//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_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) {
|
||||
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.SpeechOutputEnded()
|
||||
|
||||
|
@ -23,74 +25,78 @@ Tree("32_Grotto_Chatbot_Test") {
|
|||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
// -- Race 1: User sagt etwas
|
||||
Composite(Sequence) {
|
||||
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) {
|
||||
BTC.Wait(5)
|
||||
BTC.CompareUserSpeechInputStarted(false)
|
||||
BTC.StopSpeechIntentRecognition()
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
|
||||
// Bilder Bergell
|
||||
// --- Bilder Bergell ---
|
||||
//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(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.SpeechOutputEnded()
|
||||
|
||||
|
@ -99,38 +105,37 @@ Tree("Antwort_Nonna_Kueche") {
|
|||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
// -- Race 1: User sagt etwas
|
||||
Composite(Selector) {
|
||||
Composite(Sequence) {
|
||||
BTC.UserStartedSpeechInput()
|
||||
BTC.SpeechIntentRecognized()
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
// --- Outro ---
|
||||
//BTC.GetKeyDown("Return")
|
||||
}
|
||||
|
||||
// Intent nicht erkannt
|
||||
Composite(Sequence) {
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
// --- Outro ---
|
||||
//BTC.GetKeyDown("Return")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- Race 2: User sagt nichts
|
||||
Composite(Sequence) {
|
||||
BTC.Wait(5)
|
||||
BTC.CompareUserSpeechInputStarted(false)
|
||||
BTC.StopSpeechIntentRecognition()
|
||||
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) {
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
BTC.SynthesizeText("Okay gut, mach es dir gemütlich. Hast du etwas zum Lesen dabei?", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
|
||||
|
@ -139,32 +144,28 @@ Tree("Antwort_Nonna_Grotto") {
|
|||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
// -- Race 1: User sagt etwas
|
||||
Composite(Selector) {
|
||||
Composite(Sequence) {
|
||||
BTC.UserStartedSpeechInput()
|
||||
BTC.SpeechIntentRecognized()
|
||||
RunTree("Antwort_Nonna_Grotto_2")
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
}
|
||||
|
||||
// Intent nicht erkannt
|
||||
Composite(Sequence) {
|
||||
RunTree("Antwort_Nonna_Grotto_2")
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- Race 2: User sagt nichts
|
||||
Composite(Sequence) {
|
||||
BTC.Wait(5)
|
||||
BTC.CompareUserSpeechInputStarted(false)
|
||||
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.SpeechOutputEnded()
|
||||
|
@ -174,6 +175,7 @@ Tree("Antwort_Nonna_Grotto_2") {
|
|||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
// -- Race 1: User sagt etwas
|
||||
Composite(Selector) {
|
||||
Composite(Sequence) {
|
||||
BTC.UserStartedSpeechInput()
|
||||
|
@ -188,7 +190,8 @@ Tree("Antwort_Nonna_Grotto_2") {
|
|||
//BTC.GetKeyDown("Return")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- Race 2: User sagt nichts
|
||||
Composite(Sequence) {
|
||||
BTC.Wait(5)
|
||||
BTC.CompareUserSpeechInputStarted(false)
|
||||
|
@ -201,6 +204,7 @@ Tree("Antwort_Nonna_Grotto_2") {
|
|||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Intro") {
|
||||
// --- Kueche - Intro ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FIntro")
|
||||
|
||||
|
@ -244,6 +248,7 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
Composite(Sequence) {
|
||||
// Keine Reaction
|
||||
BTC.Wait(5)
|
||||
// --- Kueche - Steinpilze Hilfe ---
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze")
|
||||
// Pilze ins Wasser Glas legen
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")
|
||||
|
@ -256,6 +261,7 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
||||
// --- Kueche - Zwiebeln schneiden ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc")
|
||||
|
||||
|
@ -365,62 +371,140 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
|
||||
|
||||
Tree("32_Grotto_Kueche_alles_gefunden") {
|
||||
// --- Kueche - alles gefunden ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun") // Audio fehlt
|
||||
// Oel in Topf geben - Particle Trigger
|
||||
// ...
|
||||
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun")
|
||||
BTC.GetKeyDown("Return")
|
||||
|
||||
// Zwiebeln in Topf geben
|
||||
BTC.Run("NamedGrabEvent.INTERACTABLES.Zwiebeln")
|
||||
/* BTC.Run("NamedGrabEvent.INTERACTABLES.Zwiebeln")
|
||||
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln")
|
||||
BTC.Run("Collider.INTERACTABLES.Topf")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun")*/
|
||||
|
||||
// Frage beantworten
|
||||
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")
|
||||
}
|
||||
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.4", "Ja.")
|
||||
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.6", "Nein.")
|
||||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
// -- Race 1: User sagt etwas
|
||||
Composite(Sequence) {
|
||||
// Ja
|
||||
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
||||
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||
BTC.Hide("GO.HANDMENU.Option2Button")
|
||||
RunTree("32_Grotto_Kueche_Interesse_Kochen")
|
||||
BTC.UserStartedSpeechInput()
|
||||
|
||||
Composite(Selector) {
|
||||
// -- Selector 1: Intent erkannt
|
||||
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) {
|
||||
// Nein
|
||||
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
|
||||
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||
BTC.Hide("GO.HANDMENU.Option2Button")
|
||||
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
||||
BTC.Wait(5)
|
||||
BTC.CompareUserSpeechInputStarted(false)
|
||||
BTC.StopSpeechIntentRecognition()
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Interesse_Kochen") {
|
||||
// --- Kueche - Interesse Kochen ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FInteresseK")
|
||||
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Lasagne")
|
||||
BTC.Show("GO.HANDMENU.Option1Button")
|
||||
BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
|
||||
|
||||
Composite(Race) {
|
||||
Composite(Sequence) {
|
||||
// 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")
|
||||
}
|
||||
Composite(Sequence) {
|
||||
// keine Antwort
|
||||
BTC.Wait(5)
|
||||
BTC.CompareBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
|
||||
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
||||
}
|
||||
}
|
||||
|
@ -428,44 +512,86 @@ Tree("32_Grotto_Kueche_Interesse_Kochen") {
|
|||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Kochen_Anzahl") {
|
||||
// --- Kueche - Kochen Anzahl ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FKochenAnza")
|
||||
|
||||
// Frage beantworten
|
||||
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")
|
||||
}
|
||||
BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.2", "sehr oft, fast täglich (oder andere Antwort)")
|
||||
BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.4", "fast nie (oder andere Antwort)")
|
||||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
// -- Race 1: User sagt etwas
|
||||
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")
|
||||
BTC.UserStartedSpeechInput()
|
||||
|
||||
Composite(Selector) {
|
||||
// -- Selector 1: Intent erkannt
|
||||
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) {
|
||||
// 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.Hide("GO.HANDMENU.Option1Button")
|
||||
BTC.Hide("GO.HANDMENU.Option2Button")
|
||||
BTC.CompareUserSpeechInputStarted(false)
|
||||
BTC.StopSpeechIntentRecognition()
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Zusammen_Kochen") {
|
||||
// --- Kueche - Zusammen Kochen ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FZusammenKo")
|
||||
|
||||
|
@ -514,6 +640,7 @@ Tree("32_Grotto_Kueche_Zusammen_Kochen") {
|
|||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
|
||||
// --- Kueche - Selbststaendig Kochen ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FSelbststae")
|
||||
// Selbstaendig kochen...
|
||||
|
@ -524,6 +651,7 @@ Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
|
|||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Parmigiano") {
|
||||
// --- Kueche - Parmigiano ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo")
|
||||
|
||||
|
@ -557,18 +685,48 @@ Tree("32_Grotto_Kueche_Parmigiano") {
|
|||
BTC.Run("AudioSource.AUDIO.Kueche5FZusammenKo")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche6FZusammenKo")
|
||||
|
||||
// --- Outro ---
|
||||
// --- Kueche - Outro ---
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1GOutro")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche2GOutro")
|
||||
|
||||
// Name sagen
|
||||
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Mein Name ist User.")
|
||||
BTC.Show("GO.HANDMENU.Option1Button")
|
||||
BTC.AddPossbileSpeechIntent("Kueche.Outro.4", "Mein Name ist xy.")
|
||||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
||||
BTC.Wait(5)
|
||||
}
|
||||
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||
// -- 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()
|
||||
|
||||
// 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.Run("AudioSource.AUDIO.Kueche3GOutro")
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -140,9 +140,6 @@ PlayerSettings:
|
|||
bundleVersion: 0.1
|
||||
preloadedAssets:
|
||||
- {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
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
|
|
Loading…
Reference in New Issue