399 lines
18 KiB
Plaintext
399 lines
18 KiB
Plaintext
Tree("Root") {
|
|
Composite(Sequence) {
|
|
BTC.InitializeSpeechManager()
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl_Selection")
|
|
}
|
|
}
|
|
|
|
Tree("10_SBB_Zugabteil_Szenenwahl_Selection") {
|
|
Composite(Sequence) {
|
|
|
|
BTC.SetBool("handmenu_active", false)
|
|
|
|
Composite(Selector) {
|
|
Composite(Sequence) {
|
|
// Story A besucht
|
|
BTC.StoryAVisited()
|
|
|
|
Composite(Selector) {
|
|
Composite(Sequence) {
|
|
// Story A + B besucht
|
|
BTC.StoryBVisited()
|
|
|
|
Composite(Selector) {
|
|
Composite(Sequence) {
|
|
// Story A + B + C besucht
|
|
BTC.StoryCVisited()
|
|
// --- Zugabteil - Story Ende ---
|
|
BTC.SynthesizeText("Hey, jetzt waren wir drei Tage unterwegs, wir haben das Grotto meiner Nonna besucht, waren beim Castello die Montebello picknicken und im Puschlav wandern. Ich hoffe, ich konnte dir meine Heimat etwas näherbringen. Mit den Fotos, die du gemacht hast, haben wir auch tolle Erinnerungen. Besuche mich doch wieder einmal, das würde mich freuen! Gute Heimreise!")
|
|
BTC.SpeechOutputEnded()
|
|
// --- ENDE ---
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Story A + B besucht
|
|
// Story C nicht besucht
|
|
// --- Zugabteil - Repetition Intro C ---
|
|
BTC.Run("AudioSource.AUDIO.RepetitionIntroC1Z")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
}
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Story A besucht
|
|
// Story B nicht besucht
|
|
BTC.StoryCVisited()
|
|
|
|
// Story A + C besucht
|
|
// Story B nicht besucht
|
|
// --- Zugabteil - Repetition Intro B ---
|
|
BTC.Run("AudioSource.AUDIO.RepetitionIntroB1Z")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Story A besucht
|
|
// Story B + C nicht besucht
|
|
// --- Zugabteil - Repetition Intro BC ---
|
|
BTC.Run("AudioSource.AUDIO.RepetitionIntroBC1")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
}
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Story A nicht besucht
|
|
BTC.StoryBVisited()
|
|
|
|
Composite(Selector) {
|
|
Composite(Sequence) {
|
|
// Story B besucht
|
|
// Story A nicht besucht
|
|
BTC.StoryCVisited()
|
|
|
|
// Story B + C besucht
|
|
// Story A nicht besucht
|
|
// --- Zugabteil - Repetition Intro A ---
|
|
BTC.Run("AudioSource.AUDIO.RepetitionIntroA1Z")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Story B besucht
|
|
// Story A + C nicht besucht
|
|
// --- Zugabteil - Repetition Intro AC ---
|
|
BTC.Run("AudioSource.AUDIO.RepetitionIntroAC1")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
}
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Story A + B nicht besucht
|
|
BTC.StoryCVisited()
|
|
|
|
// Story C besucht
|
|
// Story A + B nicht besucht
|
|
// --- Zugabteil - Repetition Intro AB ---
|
|
BTC.Run("AudioSource.AUDIO.RepetitionIntroAB1")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Nichts besucht
|
|
Composite(Selector) {
|
|
Composite(Sequence) {
|
|
BTC.CompareRepetitionVisitedCounter(0)
|
|
// --- Zugabteil - Intro ABC erste ---
|
|
BTC.Run("AudioSource.AUDIO.IntroABCerste1Zuga")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
Composite(Sequence) {
|
|
// Erste Wiederholung
|
|
BTC.CompareRepetitionVisitedCounter(1)
|
|
// --- Zugabteil - Intro ABC zweite ---
|
|
BTC.Run("AudioSource.AUDIO.IntroABCzweite1Zug")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
Composite(Sequence) {
|
|
// Zweite Wiederholung
|
|
BTC.CompareRepetitionVisitedCounter(2)
|
|
// --- Zugabteil - Intro ABC dritte ---
|
|
BTC.Run("AudioSource.AUDIO.IntroABCdritte1Zug")
|
|
BTC.SetBool("handmenu_active")
|
|
RunTree("10_SBB_Zugabteil_Szenenwahl")
|
|
}
|
|
}
|
|
}
|
|
} // First Selector
|
|
} // Sequence
|
|
}
|
|
|
|
Tree("10_SBB_Zugabteil_Szenenwahl") {
|
|
Composite(Sequence) {
|
|
BTC.AddPossbileSpeechIntent("Zugabteil.Szenenwahl.3")
|
|
BTC.AddPossbileSpeechIntent("Zugabteil.Szenenwahl.5")
|
|
BTC.AddPossbileSpeechIntent("Zugabteil.Szenenwahl.7")
|
|
BTC.StartSpeechIntentRecognition()
|
|
|
|
Composite(Race) {
|
|
// -- Race 1: User sagt etwas
|
|
Composite(Sequence) {
|
|
BTC.UserStartedSpeechInput()
|
|
|
|
Composite(Selector) {
|
|
// -- Selector 1: Intent erkannt
|
|
Composite(Sequence) {
|
|
BTC.SpeechIntentRecognized()
|
|
BTC.AbortEventListener("NamedGrabEvent.INTERACTABLES.VRBrille")
|
|
|
|
// Intent erkannt
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Zugabteil.Szenenwahl.3")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
// Load Scene: Story A Picknicken
|
|
// ...
|
|
BTC.SetStoryAVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Zugabteil.Szenenwahl.5")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
// Load Scene: Story B Grotto
|
|
// ...
|
|
BTC.SetStoryBVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Zugabteil.Szenenwahl.7")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
// Load Scene: Story C Wandern
|
|
// ...
|
|
BTC.SetStoryCVisited()
|
|
}
|
|
}
|
|
}
|
|
|
|
// -- Selector 2: Intent nicht erkannt
|
|
Composite(Sequence) {
|
|
BTC.AbortEventListener("NamedGrabEvent.INTERACTABLES.VRBrille")
|
|
// Fallback: nicht verstanden, wiederholen
|
|
// ...
|
|
BTC.SynthesizeText("Ich habe dich leider nicht verstanden. Kannst du das bitte wiederholen? Alternativ kannst du auch die Hilfe auf dem Handy in deiner linken Hand verwenden.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.StartSpeechIntentRecognition()
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
// Option 1: Spracheingabe
|
|
BTC.UserStartedSpeechInput()
|
|
BTC.SpeechIntentRecognized()
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Zugabteil.Szenenwahl.3")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
// Load Scene: Story A Picknicken
|
|
// ...
|
|
BTC.SetStoryAVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Zugabteil.Szenenwahl.5")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
// Load Scene: Story B Grotto
|
|
// ...
|
|
BTC.SetStoryBVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Zugabteil.Szenenwahl.7")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
// Load Scene: Story C Wandern
|
|
// ...
|
|
BTC.SetStoryCVisited()
|
|
}
|
|
}
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
// Option 2: Handmenu
|
|
Composite(Marathon) {
|
|
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "picnic")
|
|
BTC.Show("GO.HANDMENU.Option1Button")
|
|
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "grotto")
|
|
BTC.Show("GO.HANDMENU.Option2Button")
|
|
BTC.Set("TextMeshPro.HANDMENU.Option3Button", "text", "escursione")
|
|
BTC.Show("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
// picnic
|
|
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
|
|
|
Composite(Marathon) {
|
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
|
BTC.Hide("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
// Load Scene: Story A Picknicken
|
|
// ...
|
|
BTC.SetStoryAVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
// grotto
|
|
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
|
|
|
|
Composite(Marathon) {
|
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
|
BTC.Hide("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
// Load Scene: Story B Grotto
|
|
// ...
|
|
BTC.SetStoryBVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
// escursione
|
|
BTC.Run("NamedEventTrigger.HANDMENU.Option3Button")
|
|
|
|
Composite(Marathon) {
|
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
|
BTC.Hide("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
// Load Scene: Story C Wandern
|
|
// ...
|
|
BTC.SetStoryCVisited()
|
|
}
|
|
} // Ende Race Buttons
|
|
} // Ende Option 2 Handmenu
|
|
} // Ende Race Optionen
|
|
|
|
} // Ende Sequence
|
|
} // Ende Selector
|
|
} // Ende Sequence 1
|
|
|
|
// -- Race 2: User sagt nichts
|
|
Composite(Sequence) {
|
|
BTC.Wait(20)
|
|
BTC.CompareUserSpeechInputStarted(false)
|
|
Decorator(Inverter) {
|
|
BTC.CompareBool("handmenu_active")
|
|
}
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
BTC.AbortEventListener("NamedGrabEvent.INTERACTABLES.VRBrille")
|
|
BTC.IncrementRepetitionVisitedCounter()
|
|
}
|
|
|
|
// -- Race 3: VR Brille in die Hand nehmen
|
|
Composite(Sequence) {
|
|
BTC.Run("NamedGrabEvent.INTERACTABLES.VRBrille")
|
|
Decorator(Inverter) {
|
|
BTC.CompareBool("handmenu_active")
|
|
}
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
BTC.IncrementRepetitionVisitedCounter()
|
|
|
|
// --- Bilder Bergell ---
|
|
//BTC.Run("LoadScene.NEXT.35Slideshow")
|
|
}
|
|
|
|
// -- Race 4: Hand Menu
|
|
Composite(Sequence) {
|
|
BTC.CompareBool("handmenu_active")
|
|
Composite(Marathon) {
|
|
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "picnic")
|
|
BTC.Show("GO.HANDMENU.Option1Button")
|
|
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "grotto")
|
|
BTC.Show("GO.HANDMENU.Option2Button")
|
|
BTC.Set("TextMeshPro.HANDMENU.Option3Button", "text", "escursione")
|
|
BTC.Show("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
// picnic
|
|
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
|
|
|
Composite(Marathon) {
|
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
|
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option3Button")
|
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
|
BTC.Hide("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
// Load Scene: Story A Picknicken
|
|
// ...
|
|
BTC.SetStoryAVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
// grotto
|
|
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
|
|
|
|
Composite(Marathon) {
|
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
|
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option3Button")
|
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
|
BTC.Hide("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
// Load Scene: Story B Grotto
|
|
// ...
|
|
BTC.SetStoryBVisited()
|
|
}
|
|
Composite(Sequence) {
|
|
// escursione
|
|
BTC.Run("NamedEventTrigger.HANDMENU.Option3Button")
|
|
|
|
Composite(Marathon) {
|
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
|
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
|
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
|
BTC.Hide("GO.HANDMENU.Option3Button")
|
|
}
|
|
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
// Load Scene: Story C Wandern
|
|
// ...
|
|
BTC.SetStoryCVisited()
|
|
}
|
|
}
|
|
}
|
|
} // Ende Race
|
|
}
|
|
}
|