Finished Zwiebeln schneiden, Add all physics layers to controllers + hands

This commit is contained in:
Nadine Ganz 2025-03-11 15:05:08 +01:00
parent 40f7978682
commit 059b92b063
4 changed files with 152 additions and 1113006 deletions

View File

@ -12,9 +12,9 @@
}
Composite(Sequence) {
RunTree("32_Grotto_Story_B_Grotto_Intro")
//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")
@ -431,8 +431,6 @@ Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche") {
}
}
// fuer Vorzeigeversion
RunTree("32_Grotto_Hide")
RunTree("32_Grotto_Kueche_Intro")
}
}
@ -502,9 +500,6 @@ Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto") {
}
}
// fuer Vorzeigeversion
RunTree("32_Grotto_Hide")
BTC.SynthesizeText("Mentre aspetti, se vuoi puoi dare un'occhiata alle foto che ho scattato di recente in Bregaglia. Puoi usare il visore che trovi sul tavolo.")
BTC.SpeechOutputEnded()
@ -658,14 +653,8 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
BTC.Run("AudioSource.AUDIO.Kueche1Zwiebelnsch")
// Zwiebeln schneiden
BTC.Set("Collider.INTERACTABLES.ZwiebelTrigger", "otherTag", "Messer")
BTC.Run("Collider.INTERACTABLES.ZwiebelTrigger")
Composite(Marathon) {
BTC.Run("StudioEventEmitter.INTERACTABLES.ZwiebelSchneiden")
BTC.Hide("GO.INTERACTABLES.Zwiebel01")
BTC.Show("GO.INTERACTABLES.GeschnitteneZwiebe")
}
BTC.FindObjectsByTag("SlicedZwiebel", 6)
BTC.Run("AudioSource.AUDIO.Kueche2Zwiebelnsch")
// Zutaten leuchten
@ -880,10 +869,9 @@ Tree("32_Grotto_Kueche_alles_gefunden") {
BTC.SynthesizeText("Bene, hai trovato tutto. Ora versa un po' di olio d'oliva nella pentola.")
BTC.SpeechOutputEnded()
// Oel in Topf geben - ToDo: Particle Trigger
// Oel in Topf geben
BTC.Run("Particle.INTERACTABLES.Olivenoel")
//BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Olivenoel")
//BTC.Run("Collider.INTERACTABLES.Topf")
BTC.Run("AudioSource.AUDIO.Kueche2allesgefund")
// Herd anstellen - ToDo: Handling in Story?
@ -891,7 +879,7 @@ Tree("32_Grotto_Kueche_alles_gefunden") {
//BTC.Run("StudioEventEmitter.STATIC.HerdplatteAnstelle")
// Zwiebeln in Topf geben
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln")
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "SlicedZwiebel")
BTC.Run("Collider.INTERACTABLES.Topf")
BTC.Run("StudioEventEmitter.INTERACTABLES.ZwiebelnInTopf")

View File

@ -525,6 +525,24 @@ public class BTC : MonoBehaviour {
}
}
}
[Task]
public void FindObjectsByTag(string tag, int minNumObjs)
{
if ((Task.getState == NodeState.FirstRun) || (Task.getState == NodeState.Running))
{
GameObject[] objsWithTag;
objsWithTag = GameObject.FindGameObjectsWithTag(tag);
if (objsWithTag.Length >= minNumObjs)
{
Debug.Log($"FindObjectsByTag found {objsWithTag.Length} objects with tag {tag}");
Task.SetSucceeded();
return;
}
}
}
#endregion
#region camera or player tracking

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,9 @@ public class SliceObjectsVR : MonoBehaviour
[SerializeField]
EventReference onCollideSoundRef;
[SerializeField]
EventReference sliceSoundRef;
#endif
void Start()
@ -64,6 +67,9 @@ public class SliceObjectsVR : MonoBehaviour
if (hull != null)
{
#if FMOD_AVAILABLE
RuntimeManager.PlayOneShot(sliceSoundRef, transform.position);
#endif
GameObject upperHull = hull.CreateUpperHull(target, crossSectionMaterial);
SetupSlicedComponent(upperHull);