Update Kueche_Abbruch in Grotto2+Grotto1

This commit is contained in:
Nadine Ganz 2025-08-05 14:14:55 +02:00
parent 4d0aa99499
commit c8587fdbbd
5 changed files with 83 additions and 58 deletions

View File

@ -11,8 +11,47 @@
BTC.SetBool("error")
}
RunTree("32_Grotto_Story_B_Grotto_Intro")
//RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
Composite(Selector) {
Composite(Sequence) {
// Check Abbruch Kochen
BTC.CheckEntryLevel(2)
// Initialization
Composite(Marathon) {
BTC.SetPosition("GO.XRInteractionHandsSetup.XROrigin", -3.573, 0, -12.124)
BTC.SetPosition("GO.HANDMENU", -3.573, 0, -12.124)
BTC.RotateToAngle("GO.XRInteractionHandsSetup.XROrigin", 0.0)
BTC.RotateToAngle("GO.HANDMENU", 0.0)
BTC.Run("StudioEventEmitter.STATIC.KuechenAmbi")
BTC.Run("StudioEventEmitter.STATIC.AmbiGarten")
BTC.FadeIn("FadeScene.XRInteractionHandsSetup.Black")
}
BTC.Wait(5)
BTC.ResetEntryLevel(2)
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto_Teil2")
}
Composite(Sequence) {
// Check Puschlav Grotto
BTC.CheckEntryLevel(1)
// Initialization
Composite(Marathon) {
BTC.SetPosition("GO.XRInteractionHandsSetup.XROrigin", -3.573, 0, -12.124)
BTC.SetPosition("GO.HANDMENU", -3.573, 0, -12.124)
BTC.RotateToAngle("GO.XRInteractionHandsSetup.XROrigin", 0.0)
BTC.RotateToAngle("GO.HANDMENU", 0.0)
BTC.Run("StudioEventEmitter.STATIC.KuechenAmbi")
BTC.Run("StudioEventEmitter.STATIC.AmbiGarten")
BTC.FadeIn("FadeScene.XRInteractionHandsSetup.Black")
}
BTC.Wait(5)
BTC.ResetEntryLevel(1)
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto_Teil2")
}
RunTree("32_Grotto_Story_B_Grotto_Intro")
}
}
Composite(Sequence) {
@ -503,8 +542,8 @@ Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto") {
// Initialization
Composite(Marathon) {
BTC.SetPosition("GO.XRInteractionHandsSetup.XROrigin", -3.573, 0, -12.295)
BTC.SetPosition("GO.HANDMENU", -3.573, 0, -12.295)
BTC.SetPosition("GO.XRInteractionHandsSetup.XROrigin", -3.573, 0, -12.124)
BTC.SetPosition("GO.HANDMENU", -3.573, 0, -12.124)
BTC.RotateToAngle("GO.XRInteractionHandsSetup.XROrigin", 0.0)
BTC.RotateToAngle("GO.HANDMENU", 0.0)
BTC.Run("StudioEventEmitter.STATIC.KuechenAmbi")
@ -527,6 +566,13 @@ Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto") {
}
}
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto_Teil2")
}
}
Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto_Teil2") {
// --- Story B Grotto - Antwort Nonna Grotto Teil 2 ---
Composite(Sequence) {
BTC.Run("MediaPlayer.VIDEOS.AntwortNonnaGrotto_Teil2F2")
BTC.Run("MediaPlayer.VIDEOS.AntwortNonnaGrotto_Teil2Fidle03")
BTC.AddPossbileSpeechIntent("Story_B_Grotto-Antwort_Nonna_Grotto_Teil2-U-3a")

View File

@ -155,8 +155,16 @@ Tree("32_Grotto_Kueche_Intro") {
Composite(Sequence) {
// --- Kueche - Abbruch ---
BTC.Hide("MediaPlayer.VIDEOS.ZwiebelnschneidenF_Idle02")
BTC.Run("MediaPlayer.VIDEOS.AbbruchF1")
// TODO: Define Jump Point to grotto 1
Composite(Marathon) {
BTC.Run("MediaPlayer.VIDEOS.AbbruchF1")
Composite(Sequence) {
BTC.Wait(7)
BTC.FadeOut("FadeScene.XRInteractionHandsSetup.Black")
}
}
BTC.SetEntryLevel(2)
BTC.Run("LoadScene.NEXT.32Grotto1")
}
}

View File

@ -1159,13 +1159,12 @@ public class BTC : MonoBehaviour {
#region Entry Level Point
[Task]
public void GoToGrottoKueche()
public void CheckEntryLevel(int entryPoint)
{
if (Task.getState == NodeState.FirstRun)
{
if (EntryLevel.GoToGrottoKueche)
if (EntryLevel.entries[entryPoint] == true)
{
Debug.Log("Go to Grotto Kueche");
Task.SetSucceeded();
return;
}
@ -1178,21 +1177,24 @@ public class BTC : MonoBehaviour {
}
[Task]
public void GoToGrottoEssen()
public void SetEntryLevel(int entryPoint)
{
if (Task.getState == NodeState.FirstRun)
{
if (EntryLevel.GoToGrottoEssen)
{
Debug.Log("Go to Grotto Essen");
Task.SetSucceeded();
return;
}
else
{
Task.SetFailed();
return;
}
EntryLevel.entries[entryPoint] = true;
Task.SetSucceeded();
return;
}
}
[Task]
public void ResetEntryLevel(int entryPoint)
{
if (Task.getState == NodeState.FirstRun)
{
EntryLevel.entries[entryPoint] = false;
Task.SetSucceeded();
return;
}
}
#endregion

View File

@ -4,6 +4,10 @@ using UnityEngine;
public static class EntryLevel
{
public static bool GoToGrottoKueche = false;
public static bool GoToGrottoEssen = false;
/* Entry Levels:
* 0: Minigame SBB
* 1: Minigame Grotto
* 2: Grotto Kochen Abbruch
*/
public static bool[] entries = new bool[3];
}

View File

@ -12,15 +12,8 @@ public class LevelManager : MonoBehaviour
{
public Button levelButton;
public string sceneName;
public string jumpPoint;
}
[SerializeField]
string jumpPointGrottoEssen;
[SerializeField]
string jumpPointGrottoKueche;
[SerializeField]
float fadeDuration = 2f;
@ -34,10 +27,6 @@ public class LevelManager : MonoBehaviour
private void Awake()
{
// Reset entry level points
EntryLevel.GoToGrottoKueche = false;
EntryLevel.GoToGrottoEssen = false;
// Loop through each level entry and hook up the button to load the correct scene
foreach (var entry in levels)
{
@ -48,10 +37,6 @@ public class LevelManager : MonoBehaviour
string sceneToLoad = entry.sceneName;
entry.levelButton.onClick.AddListener(() => OnClickLoadLevel(sceneToLoad));
string goToJumpPoint = entry.jumpPoint;
entry.levelButton.onClick.AddListener(() => SetEntryLevel(goToJumpPoint));
}
}
@ -98,24 +83,4 @@ public class LevelManager : MonoBehaviour
color.a = 1f;
_fadeMaterial.color = color;
}
public void SetEntryLevel(string entryPoint)
{
if (string.IsNullOrEmpty(entryPoint))
{
return;
}
if (entryPoint == jumpPointGrottoEssen)
{
EntryLevel.GoToGrottoEssen = true;
return;
}
if (entryPoint == jumpPointGrottoKueche)
{
EntryLevel.GoToGrottoKueche = true;
return;
}
}
}