Bug Fixing in grotto kitchen scene
parent
2c3f796138
commit
1ec43f1676
|
@ -1,8 +1,8 @@
|
|||
Tree("Root") {
|
||||
Composite(Sequence) {
|
||||
BTC.InitializeSpeechManager()
|
||||
//RunTree("32_Grotto_Kueche_Intro")
|
||||
//RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
|
||||
RunTree("32_Grotto_Kueche_Intro")
|
||||
RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
|
||||
RunTree("32_Grotto_Kueche_alles_gefunden")
|
||||
//RunTree("32_Grotto_Kueche_Kochen_Anzahl")
|
||||
//RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
||||
|
@ -213,7 +213,10 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
//BTC.GetKeyDown("Return")
|
||||
BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
|
||||
BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche2FIntro")
|
||||
|
||||
//BTC.Run("AudioSource.AUDIO.Kueche2FIntro")
|
||||
BTC.SynthesizeText("Lies mir bitte das Rezept vor.", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
|
||||
// Rezept vorlesen: Button Klick
|
||||
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Rezept vorlesen")
|
||||
|
@ -228,7 +231,8 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
Composite(Sequence) {
|
||||
// keine Reaktion
|
||||
BTC.Wait(5)
|
||||
// BTC.Run(Audio)
|
||||
BTC.SynthesizeText("Was brauchen wir? Bitte lies mir das Rezept vor.", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
||||
}
|
||||
}
|
||||
|
@ -301,31 +305,32 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
Composite(Sequence) {
|
||||
// Success
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
|
||||
//BTC.GetKeyDown("Return")
|
||||
BTC.SetBool("RisottoIsSnapped")
|
||||
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
BTC.SetBool("IsSnapped")
|
||||
}
|
||||
Composite(Sequence) {
|
||||
// Fail
|
||||
BTC.Run("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
//BTC.GetKeyDown("Space")
|
||||
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
BTC.CompareBool("RisottoIsSnapped", false)
|
||||
|
||||
Composite(Marathon) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche2FZwiebelnsc")
|
||||
// Objekt geht zurueck
|
||||
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -6.733, 1.362, -18.908)
|
||||
}
|
||||
|
||||
BTC.SetBool("IsSnapped", false)
|
||||
// Objekt geht zurueck
|
||||
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -6.733, 1.362, -18.908)
|
||||
|
||||
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
BTC.SetBool("RisottoIsSnapped", false)
|
||||
}
|
||||
}
|
||||
|
||||
BTC.CompareBool("IsSnapped")
|
||||
BTC.CompareBool("RisottoIsSnapped")
|
||||
} // Sequence
|
||||
}
|
||||
} // Repeat
|
||||
|
||||
|
||||
Composite(Sequence) {
|
||||
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
|
||||
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.SalzSocket")
|
||||
|
@ -356,6 +361,7 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
}
|
||||
}
|
||||
|
||||
BTC.SetBool("RisottoIsSnapped", false)
|
||||
BTC.Wait(1)
|
||||
|
||||
Composite(Marathon) {
|
||||
|
@ -511,6 +517,7 @@ Tree("32_Grotto_Kueche_Interesse_Kochen") {
|
|||
// keine Antwort
|
||||
BTC.Wait(5)
|
||||
BTC.CompareBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
|
||||
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
|
||||
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
||||
}
|
||||
|
@ -663,16 +670,19 @@ Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
|
|||
Tree("32_Grotto_Kueche_Parmigiano") {
|
||||
// --- Kueche - Parmigiano ---
|
||||
Composite(Sequence) {
|
||||
BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo")
|
||||
BTC.SynthesizeText("Schau, ich habe dir den Parmigiano hingestellt. Du kannst ihn nun in den Topf geben.", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
|
||||
// Parmigiano in Topf geben
|
||||
BTC.Run("NamedGrabEvent.INTERACTABLES.Parmigiano")
|
||||
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Parmigiano")
|
||||
BTC.Run("Collider.INTERACTABLES.Topf")
|
||||
|
||||
BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo") // Richtige Audio fehlt
|
||||
BTC.SynthesizeText("Bist du fertig?", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
|
||||
// Antwort User
|
||||
// ToDo: Sprache fehlt
|
||||
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
|
||||
BTC.Show("GO.HANDMENU.Option1Button")
|
||||
Composite(Race) {
|
||||
|
@ -681,7 +691,8 @@ Tree("32_Grotto_Kueche_Parmigiano") {
|
|||
}
|
||||
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||
|
||||
BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo") // Richtige Audio fehlt
|
||||
BTC.SynthesizeText("Bitte stelle den Risotto hier hin.", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
|
||||
// Stelle für Pfanne leuchtet
|
||||
BTC.Enable("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")
|
||||
|
@ -691,16 +702,18 @@ Tree("32_Grotto_Kueche_Parmigiano") {
|
|||
BTC.Set("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer", "otherTag", "Topf")
|
||||
BTC.Run("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")
|
||||
BTC.Disable("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")
|
||||
// ToDo: Fallback Keine Reaktion
|
||||
|
||||
BTC.Run("AudioSource.AUDIO.Kueche5FZusammenKo")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche6FZusammenKo")
|
||||
|
||||
// --- Kueche - Outro ---
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1GOutro")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche2GOutro")
|
||||
BTC.SynthesizeText("Ich bin Giuseppe, Francescas Grossonkel. Und wer bist du?", "de-DE", "")
|
||||
BTC.SpeechOutputEnded()
|
||||
|
||||
// Name sagen
|
||||
BTC.AddPossbileSpeechIntent("Kueche.Outro.4", "Mein Name ist xy.")
|
||||
BTC.AddPossbileSpeechIntent("Kueche.Outro.4", "Mein Name ist xy. (oder andere Antwort)")
|
||||
BTC.StartSpeechIntentRecognition()
|
||||
|
||||
Composite(Race) {
|
||||
|
@ -739,6 +752,7 @@ Tree("32_Grotto_Kueche_Parmigiano") {
|
|||
}
|
||||
|
||||
BTC.Run("AudioSource.AUDIO.Kueche3GOutro")
|
||||
BTC.Run("AudioSource.AUDIO.Kueche2GOutro")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -264,6 +264,18 @@ public class BTC : MonoBehaviour {
|
|||
Task.SetSucceeded();
|
||||
}
|
||||
}
|
||||
|
||||
[Task]
|
||||
public void ListenToEvent(string objectName)
|
||||
{
|
||||
List<ComponentHandler> handlers = GetHandlers(objectName);
|
||||
handlers.ForEach(handler => handler.ListenToEvent(Task.getState));
|
||||
if (handlers.Count == 0)
|
||||
{
|
||||
Debug.LogWarning($"BTC.ListenToEvent: no components under the name '{objectName}'");
|
||||
Task.SetSucceeded();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region video & sound tasks
|
||||
|
|
|
@ -186,7 +186,6 @@ public class ComponentHandler : MonoBehaviour {
|
|||
{
|
||||
Debug.LogWarning($"ComponentHandler.Enable: not implemented for {this.GetType()}");
|
||||
}
|
||||
Task.SetError();
|
||||
}
|
||||
|
||||
public virtual void Disable(MyBT.NodeState nodeState)
|
||||
|
@ -195,7 +194,6 @@ public class ComponentHandler : MonoBehaviour {
|
|||
{
|
||||
Debug.LogWarning($"ComponentHandler.Disable: not implemented for {this.GetType()}");
|
||||
}
|
||||
Task.SetError();
|
||||
}
|
||||
|
||||
public virtual void SetPosition(MyBT.NodeState nodeState, float newX, float newY, float newZ)
|
||||
|
@ -204,7 +202,6 @@ public class ComponentHandler : MonoBehaviour {
|
|||
{
|
||||
Debug.LogWarning($"ComponentHandler.SetPosition: not implemented for {this.GetType()}");
|
||||
}
|
||||
Task.SetError();
|
||||
}
|
||||
|
||||
public virtual void AbortEventListener(MyBT.NodeState nodeState)
|
||||
|
@ -213,7 +210,14 @@ public class ComponentHandler : MonoBehaviour {
|
|||
{
|
||||
Debug.LogWarning($"ComponentHandler.AbortEventListener: not implemented for {this.GetType()}");
|
||||
}
|
||||
Task.SetError();
|
||||
}
|
||||
|
||||
public virtual void ListenToEvent(MyBT.NodeState nodeState)
|
||||
{
|
||||
if (Task.isDebugging)
|
||||
{
|
||||
Debug.LogWarning($"ComponentHandler.ListenToEvent: not implemented for {this.GetType()}");
|
||||
}
|
||||
}
|
||||
|
||||
protected float sourceAlpha;
|
||||
|
|
|
@ -74,23 +74,43 @@ public class NamedGrabEvent : ComponentHandler {
|
|||
if (nodeState == NodeState.FirstRun) {
|
||||
// reset event trigger at start
|
||||
selectEnterTriggered = false;
|
||||
selectExitTriggered = false;
|
||||
}
|
||||
|
||||
if (nodeState == NodeState.Aborting) {
|
||||
selectEnterTriggered = false;
|
||||
selectExitTriggered = false;
|
||||
}
|
||||
|
||||
if (selectEnterTriggered) {
|
||||
Task.SetSucceeded();
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectExitTriggered)
|
||||
{
|
||||
Debug.Log($"NamedGrabEvent: Select entered event from {gameObject.name} fired.");
|
||||
Task.SetSucceeded();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ListenToEvent(MyBT.NodeState nodeState)
|
||||
{
|
||||
if (nodeState == NodeState.FirstRun)
|
||||
{
|
||||
// reset event trigger at start
|
||||
selectExitTriggered = false;
|
||||
Debug.Log("Enter ListenToEvent");
|
||||
}
|
||||
|
||||
if (nodeState == NodeState.Aborting)
|
||||
{
|
||||
selectExitTriggered = false;
|
||||
}
|
||||
|
||||
if (nodeState == NodeState.Running)
|
||||
{
|
||||
if (selectExitTriggered)
|
||||
{
|
||||
Debug.Log($"NamedGrabEvent: Select exited event from {gameObject.name} fired.");
|
||||
Task.SetSucceeded();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ public class NamedSocketEvent : ComponentHandler
|
|||
|
||||
if (triggered)
|
||||
{
|
||||
Debug.Log($"NamedSocketEvent: Select entered event from {gameObject.name} fired.");
|
||||
Task.SetSucceeded();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
2024-09-23T15:03:45.7173120Z
|
||||
2024-09-24T15:23:51.5884920Z
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue