Skip-Feature for Grotto Essen and Grotto Kueche (in Menu and in 3.2 Scene)

This commit is contained in:
Nadine Ganz 2025-04-10 17:17:18 +02:00
parent aadb3c3622
commit dbf1dfb9e5
7 changed files with 2028 additions and 1222464 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1147,6 +1147,46 @@ public class BTC : MonoBehaviour {
} }
#endregion #endregion
#region Entry Level Point
[Task]
public void GoToGrottoKueche()
{
if (Task.getState == NodeState.FirstRun)
{
if (EntryLevel.GoToGrottoKueche)
{
Debug.Log("Go to Grotto Kueche");
Task.SetSucceeded();
return;
}
else
{
Task.SetFailed();
return;
}
}
}
[Task]
public void GoToGrottoEssen()
{
if (Task.getState == NodeState.FirstRun)
{
if (EntryLevel.GoToGrottoEssen)
{
Debug.Log("Go to Grotto Essen");
Task.SetSucceeded();
return;
}
else
{
Task.SetFailed();
return;
}
}
}
#endregion
#region Oculus Input #region Oculus Input
#if OCULUSVR_AVAILABLE #if OCULUSVR_AVAILABLE
[Task] [Task]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class EntryLevel
{
public static bool GoToGrottoKueche = false;
public static bool GoToGrottoEssen = false;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d879700825747437bbbf793189a31e35
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -12,13 +12,25 @@ public class LevelManager : MonoBehaviour
{ {
public Button levelButton; public Button levelButton;
public string sceneName; public string sceneName;
public string jumpPoint;
} }
[SerializeField]
private string jumpPointGrottoEssen;
[SerializeField]
private string jumpPointGrottoKueche;
// A list of LevelEntry objects that can be filled in the inspector // A list of LevelEntry objects that can be filled in the inspector
public List<LevelEntry> levels = new List<LevelEntry>(); public List<LevelEntry> levels = new List<LevelEntry>();
private void Awake() 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 // Loop through each level entry and hook up the button to load the correct scene
foreach (var entry in levels) foreach (var entry in levels)
{ {
@ -29,6 +41,10 @@ public class LevelManager : MonoBehaviour
string sceneToLoad = entry.sceneName; string sceneToLoad = entry.sceneName;
entry.levelButton.onClick.AddListener(() => OnClickLoadLevel(sceneToLoad)); entry.levelButton.onClick.AddListener(() => OnClickLoadLevel(sceneToLoad));
string goToJumpPoint = entry.jumpPoint;
entry.levelButton.onClick.AddListener(() => SetEntryLevel(goToJumpPoint));
} }
} }
} }
@ -49,4 +65,24 @@ public class LevelManager : MonoBehaviour
yield return null; yield return null;
} }
} }
public void SetEntryLevel(string entryPoint)
{
if (string.IsNullOrEmpty(entryPoint))
{
return;
}
if (entryPoint == jumpPointGrottoEssen)
{
EntryLevel.GoToGrottoEssen = true;
return;
}
if (entryPoint == jumpPointGrottoKueche)
{
EntryLevel.GoToGrottoKueche = true;
return;
}
}
} }