Further implemented kitchen story and added audio

dev
Nadine Ganz 2024-12-05 17:35:06 +01:00
parent 01b3c4bf6b
commit b5f24f5f68
15 changed files with 16791 additions and 663393 deletions

View File

@ -3,9 +3,9 @@
BTC.InitializeSpeechManager() BTC.InitializeSpeechManager()
//BTC.SetSpeechRecognitionLanguage("it-IT") //BTC.SetSpeechRecognitionLanguage("it-IT")
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_Zwiebeln_schneiden")
//RunTree("32_Grotto_Kueche_alles_gefunden") //RunTree("32_Grotto_Kueche_alles_gefunden")
//RunTree("32_Grotto_Kueche_Kochen_Anzahl") //RunTree("32_Grotto_Kueche_Kochen_Anzahl")
@ -462,6 +462,7 @@ Tree("32_Grotto_Kueche_Intro") {
// Schuerze greifen // Schuerze greifen
BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze") BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
//BTC.GetKeyDown("Return")
BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze") BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
BTC.SynthesizeText("Lies mir bitte das Rezept vor.") BTC.SynthesizeText("Lies mir bitte das Rezept vor.")
@ -481,6 +482,9 @@ Tree("32_Grotto_Kueche_Intro") {
// Intent nicht erkannt // Intent nicht erkannt
Composite(Sequence) { Composite(Sequence) {
Decorator(Inverter) {
BTC.CompareUserSpeechInputStarted(false)
}
BTC.ClearPossbileSpeechIntents() BTC.ClearPossbileSpeechIntents()
} }
} }
@ -542,7 +546,6 @@ Tree("32_Grotto_Kueche_Intro") {
// --- Kueche - Steinpilze Hilfe --- // --- Kueche - Steinpilze Hilfe ---
BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze") BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze")
// Pilze ins Wasser Glas legen // Pilze ins Wasser Glas legen
BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze")
BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger") BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger")
} }
} }
@ -556,7 +559,11 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc") BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc")
// Zwiebeln schneiden // Zwiebeln schneiden
// ... BTC.Set("Collider.INTERACTABLES.ZwiebelTrigger", "otherTag", "Messer")
BTC.Run("Collider.INTERACTABLES.ZwiebelTrigger")
BTC.Run("StudioEventEmitter.INTERACTABLES.GrottoKcheZwiebeln")
BTC.Hide("GO.INTERACTABLES.Zwiebel01")
BTC.Show("GO.INTERACTABLES.GeschnitteneZwiebe")
BTC.Run("AudioSource.AUDIO.Kueche2FZwiebelnsc") BTC.Run("AudioSource.AUDIO.Kueche2FZwiebelnsc")
@ -566,7 +573,7 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket") BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein") BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
BTC.Show("GO/NamedSocketEvent.SOCKETS.WeissweinSocket") BTC.Show("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto") BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
BTC.Show("GO/NamedSocketEvent.SOCKETS.RisottoSocket") BTC.Show("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel") BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket") BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
@ -583,7 +590,7 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
Decorator (RepeatUntilFailed) { Decorator (RepeatUntilFailed) {
Decorator(Inverter) { Decorator(Inverter) {
Composite(Sequence) { Composite(Sequence) {
BTC.Run("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto") BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
//BTC.GetKeyDown("Return") //BTC.GetKeyDown("Return")
Composite(Race) { Composite(Race) {
@ -601,7 +608,7 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
BTC.CompareBool("RisottoIsSnapped", false) BTC.CompareBool("RisottoIsSnapped", false)
// Objekt geht zurueck // Objekt geht zurueck
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -6.733, 1.362, -18.908) BTC.SetPosition("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -6.733, 1.362, -18.908)
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.") BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
BTC.SpeechOutputEnded() BTC.SpeechOutputEnded()

View File

@ -31,7 +31,8 @@ public class NamedStudioEventEmitter : ComponentHandler {
public override string ContentLabel() { public override string ContentLabel() {
UpdateComponent(); UpdateComponent();
string[] eventName = studioEventEmitter.Event.Split('/'); #if UNITY_EDITOR
string[] eventName = studioEventEmitter.EventReference.Path.Split('/');
string sndName = eventName[eventName.Length - 1]; string sndName = eventName[eventName.Length - 1];
if (sndName.Trim().Length == 0) { if (sndName.Trim().Length == 0) {
sndName = "undefined"; sndName = "undefined";
@ -40,6 +41,9 @@ public class NamedStudioEventEmitter : ComponentHandler {
// sndName += "_" + manualNamePost; // sndName += "_" + manualNamePost;
// } // }
return sndName; return sndName;
#else
return objName;
#endif
} }
public override void UpdateComponent() { public override void UpdateComponent() {
@ -48,6 +52,7 @@ public class NamedStudioEventEmitter : ComponentHandler {
} }
public StudioEventEmitter studioEventEmitter; public StudioEventEmitter studioEventEmitter;
public string objName = "FMODAudio";
public override string titleText { public override string titleText {
get { get {

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: ARM64 CPU: ARM64
- first: - first:

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: ARM64 CPU: ARM64
- first: - first:

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: ARMv7 CPU: ARMv7
- first: - first:

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: ARMv7 CPU: ARMv7
- first: - first:

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: x86 CPU: x86
- first: - first:

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: x86 CPU: x86
- first: - first:

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: x86_64 CPU: x86_64
- first: - first:

View File

@ -14,7 +14,7 @@ PluginImporter:
- first: - first:
Android: Android Android: Android
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: x86_64 CPU: x86_64
- first: - first:

View File

@ -2689,7 +2689,7 @@ GameObject:
- component: {fileID: 8061268387521178252} - component: {fileID: 8061268387521178252}
- component: {fileID: 9007450541643059173} - component: {fileID: 9007450541643059173}
m_Layer: 0 m_Layer: 0
m_Name: NamedEventTrigger.HANDMENU.Option3Button_69596 m_Name: NamedEventTrigger.HANDMENU.Option3Button_116282
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -2826,7 +2826,7 @@ MonoBehaviour:
handlers: handlers:
- {fileID: 9007450541643059173} - {fileID: 9007450541643059173}
roomId: HANDMENU roomId: HANDMENU
uniqueId: 69596 uniqueId: 116282
--- !u!114 &9007450541643059173 --- !u!114 &9007450541643059173
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1 +1 @@
2024-11-28T15:21:51.9731950Z 2024-12-05T16:12:01.6739900Z

File diff suppressed because it is too large Load Diff

View File

@ -3,19 +3,51 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using FMODUnity; using FMODUnity;
[RequireComponent(typeof(Rigidbody))]
public class OnCollideSound : MonoBehaviour public class OnCollideSound : MonoBehaviour
{ {
[SerializeField] [SerializeField]
EventReference soundRef; EventReference soundRef;
[SerializeField] [SerializeField]
float minCollisionForce = 1.0f; float minVelocity = 0.1f;
[SerializeField]
List<string> specialTags = new List<string>();
[SerializeField]
List<EventReference> specialSounds = new List<EventReference>();
private bool _specialCase = false;
private Rigidbody _rigidbody;
private void Start()
{
_rigidbody = GetComponent<Rigidbody>();
}
private void OnCollisionEnter(Collision collision) private void OnCollisionEnter(Collision collision)
{ {
if (collision.relativeVelocity.magnitude >= minCollisionForce) if (_rigidbody.velocity.magnitude >= minVelocity)
{ {
for(int i=0; i<specialTags.Count; i++)
{
if (collision.transform.tag == specialTags[i])
{
RuntimeManager.PlayOneShot(specialSounds[i], transform.position);
_specialCase = true;
break;
}
}
if (!_specialCase)
{
// Play default collide sound
RuntimeManager.PlayOneShot(soundRef, transform.position); RuntimeManager.PlayOneShot(soundRef, transform.position);
Debug.Log(gameObject.name);
}
_specialCase = false;
} }
} }
} }

View File

@ -17,6 +17,7 @@ TagManager:
- Loeffel - Loeffel
- Parmigiano - Parmigiano
- Topf - Topf
- Messer
layers: layers:
- Default - Default
- TransparentFX - TransparentFX