Implementing story B kueche
This commit is contained in:
		
							parent
							
								
									4652e1c4f0
								
							
						
					
					
						commit
						4ca252568e
					
				@ -14,11 +14,13 @@
 | 
			
		||||
            Composite(Sequence) {
 | 
			
		||||
                //RunTree("32_Grotto_Story_B_Grotto_Intro")
 | 
			
		||||
 | 
			
		||||
                RunTree("32_Grotto_Kueche_Intro")
 | 
			
		||||
                //RunTree("32_Grotto_Kueche_Intro")
 | 
			
		||||
                //RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
 | 
			
		||||
                //RunTree("32_Grotto_Kueche_alles_gefunden")
 | 
			
		||||
                //RunTree("32_Grotto_Kueche_Interesse_Kochen")
 | 
			
		||||
                //RunTree("32_Grotto_Kueche_Kochen_Anzahl")
 | 
			
		||||
                //RunTree("32_Grotto_Kueche_Zusammen_Kochen")
 | 
			
		||||
                RunTree("32_Grotto_Kueche_Parmigiano")
 | 
			
		||||
                //RunTree("32_Grotto_Im_Grotto_Essen_Intro")
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@ -924,28 +926,43 @@ Tree("32_Grotto_Kueche_Interesse_Kochen") {
 | 
			
		||||
// --- Kueche - Interesse Kochen ---
 | 
			
		||||
    Composite(Sequence) {
 | 
			
		||||
        BTC.Run("AudioSource.AUDIO.Kueche1InteresseKo")
 | 
			
		||||
        // ToDo: Freie Antwort als Speech Input
 | 
			
		||||
        BTC.Set("TextMeshPro.GO.Option1Button", "text", "Lasagne")
 | 
			
		||||
        BTC.Show("GO.GO.Option1Button")
 | 
			
		||||
        BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
 | 
			
		||||
        // Frage beantworten
 | 
			
		||||
        BTC.AddPossbileSpeechIntent("Kueche.Interesse_Kochen.2")
 | 
			
		||||
        BTC.StartSpeechIntentRecognition()
 | 
			
		||||
 | 
			
		||||
        Composite(Race) {
 | 
			
		||||
            // -- Race 1: User sagt etwas
 | 
			
		||||
            Composite(Sequence) {
 | 
			
		||||
                // Lieblingsessen nennen
 | 
			
		||||
                BTC.Run("NamedEventTrigger.GO.Option1Button")
 | 
			
		||||
                BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked")
 | 
			
		||||
                BTC.Hide("GO.GO.Option1Button")
 | 
			
		||||
                RunTree("32_Grotto_Kueche_Kochen_Anzahl")
 | 
			
		||||
                BTC.UserStartedSpeechInput()
 | 
			
		||||
                
 | 
			
		||||
                Composite(Selector) {
 | 
			
		||||
                    // -- Selector 1: Intent erkannt
 | 
			
		||||
                    Composite(Sequence) {
 | 
			
		||||
                        BTC.SpeechIntentRecognized()
 | 
			
		||||
 | 
			
		||||
                        // Intent erkannt
 | 
			
		||||
                        BTC.ClearPossbileSpeechIntents()
 | 
			
		||||
                        RunTree("32_Grotto_Kueche_Kochen_Anzahl")
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    // -- Selector 2: Intent nicht erkannt
 | 
			
		||||
                    Composite(Sequence) {
 | 
			
		||||
                        BTC.ClearPossbileSpeechIntents()
 | 
			
		||||
                        RunTree("32_Grotto_Kueche_Kochen_Anzahl")
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // -- Race 2: User sagt nichts
 | 
			
		||||
            Composite(Sequence) {
 | 
			
		||||
                // keine Antwort
 | 
			
		||||
                BTC.Wait(5)
 | 
			
		||||
                BTC.CompareBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
 | 
			
		||||
                BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button")
 | 
			
		||||
                BTC.Hide("GO.GO.Option1Button")
 | 
			
		||||
                BTC.CompareUserSpeechInputStarted(false)
 | 
			
		||||
                BTC.AbortSpeechEventListener()
 | 
			
		||||
                BTC.StopSpeechIntentRecognition()
 | 
			
		||||
                BTC.ClearPossbileSpeechIntents()
 | 
			
		||||
                RunTree("32_Grotto_Kueche_Zusammen_Kochen")
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        }    
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1108,26 +1125,50 @@ Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
 | 
			
		||||
Tree("32_Grotto_Kueche_Parmigiano") {
 | 
			
		||||
// --- Kueche - Parmigiano ---
 | 
			
		||||
    Composite(Sequence) {
 | 
			
		||||
        BTC.SynthesizeText("Schau, ich habe dir den Parmigiano hingestellt. Du kannst ihn nun in den Topf geben.")
 | 
			
		||||
        BTC.SynthesizeText("Ho preparato il parmigiano, puoi aggiungerlo al risotto, per piacere?")
 | 
			
		||||
        BTC.SpeechOutputEnded()
 | 
			
		||||
 | 
			
		||||
        // Parmigiano in Topf geben
 | 
			
		||||
        BTC.Run("NamedGrabEvent.INTERACTABLES.Parmigiano")
 | 
			
		||||
        BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Parmigiano")
 | 
			
		||||
        BTC.Run("Collider.INTERACTABLES.Topf")
 | 
			
		||||
 | 
			
		||||
        BTC.SynthesizeText("Bist du fertig?")
 | 
			
		||||
        BTC.SynthesizeText("Hai finito?")
 | 
			
		||||
        BTC.SpeechOutputEnded()
 | 
			
		||||
 | 
			
		||||
        // Antwort User
 | 
			
		||||
        // ToDo: Sprache fehlt
 | 
			
		||||
        BTC.Set("TextMeshPro.GO.Option1Button", "text", "Ja")
 | 
			
		||||
        BTC.Show("GO.GO.Option1Button")
 | 
			
		||||
        BTC.AddPossbileSpeechIntent("Kueche.Zusammen_Kochen.6")
 | 
			
		||||
        BTC.StartSpeechIntentRecognition()
 | 
			
		||||
 | 
			
		||||
        Composite(Race) {
 | 
			
		||||
            BTC.Run("NamedEventTrigger.GO.Option1Button")
 | 
			
		||||
            BTC.Wait(5)
 | 
			
		||||
            // -- Race 1: User sagt etwas
 | 
			
		||||
            Composite(Sequence) {
 | 
			
		||||
                BTC.UserStartedSpeechInput()
 | 
			
		||||
                
 | 
			
		||||
                Composite(Selector) {
 | 
			
		||||
                    // -- Selector 1: Intent erkannt
 | 
			
		||||
                    Composite(Sequence) {
 | 
			
		||||
                        BTC.SpeechIntentRecognized()
 | 
			
		||||
 | 
			
		||||
                        // Intent erkannt
 | 
			
		||||
                        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.Hide("GO.GO.Option1Button")
 | 
			
		||||
 | 
			
		||||
        BTC.SynthesizeText("Bitte stelle den Risotto hier hin.")
 | 
			
		||||
        BTC.SpeechOutputEnded()
 | 
			
		||||
 | 
			
		||||
@ -22,12 +22,12 @@ public class LoadSpeechData : MonoBehaviour
 | 
			
		||||
 | 
			
		||||
        foreach (IntentData _obj in _intentList.intents)
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Log($"IntentID: {_obj.intentID}, Sentences Count: {_obj.intentSentences.Count}");
 | 
			
		||||
            //Debug.Log($"IntentID: {_obj.intentID}, Sentences Count: {_obj.intentSentences.Count}");
 | 
			
		||||
            
 | 
			
		||||
            string _combinedSentences = string.Join(", ", _obj.intentSentences);
 | 
			
		||||
 | 
			
		||||
            _dicIntents.Add(_obj.intentID, _combinedSentences);
 | 
			
		||||
            Debug.Log($"Added {_combinedSentences} to {_obj.intentID}");
 | 
			
		||||
            //Debug.Log($"Added {_combinedSentences} to {_obj.intentID}");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        SpeechData.intents = _dicIntents;
 | 
			
		||||
 | 
			
		||||
@ -173,12 +173,7 @@
 | 
			
		||||
            "intentID": "Kueche.Interesse_Kochen.2",
 | 
			
		||||
            "intentSentences": [
 | 
			
		||||
                "Mi piace fare la pizza.",
 | 
			
		||||
                "Mi piace fare torte o biscotti al forno."
 | 
			
		||||
            ]
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "intentID": "Kueche.Interesse_Kochen.4",
 | 
			
		||||
            "intentSentences": [
 | 
			
		||||
                "Mi piace fare torte o biscotti al forno.",
 | 
			
		||||
                "Mi piace fare la pasta.",
 | 
			
		||||
                "Cucino con la mamma."
 | 
			
		||||
            ]
 | 
			
		||||
@ -199,6 +194,12 @@
 | 
			
		||||
                "No, non cucino mai."
 | 
			
		||||
            ]
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "intentID": "Kueche.Zusammen_Kochen.6",
 | 
			
		||||
            "intentSentences": [
 | 
			
		||||
                "S\u00ec."
 | 
			
		||||
            ]
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "intentID": "Kueche.Outro.4",
 | 
			
		||||
            "intentSentences": [
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user