Further implemented kitchen story and added audio
parent
01b3c4bf6b
commit
b5f24f5f68
|
@ -3,9 +3,9 @@
|
|||
BTC.InitializeSpeechManager()
|
||||
//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_alles_gefunden")
|
||||
//RunTree("32_Grotto_Kueche_Kochen_Anzahl")
|
||||
|
@ -462,6 +462,7 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
|
||||
// Schuerze greifen
|
||||
BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
|
||||
//BTC.GetKeyDown("Return")
|
||||
BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
|
||||
|
||||
BTC.SynthesizeText("Lies mir bitte das Rezept vor.")
|
||||
|
@ -481,6 +482,9 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
|
||||
// Intent nicht erkannt
|
||||
Composite(Sequence) {
|
||||
Decorator(Inverter) {
|
||||
BTC.CompareUserSpeechInputStarted(false)
|
||||
}
|
||||
BTC.ClearPossbileSpeechIntents()
|
||||
}
|
||||
}
|
||||
|
@ -542,7 +546,6 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
// --- Kueche - Steinpilze Hilfe ---
|
||||
BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze")
|
||||
// Pilze ins Wasser Glas legen
|
||||
BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze")
|
||||
BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger")
|
||||
}
|
||||
}
|
||||
|
@ -556,7 +559,11 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc")
|
||||
|
||||
// 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")
|
||||
|
||||
|
@ -566,7 +573,7 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
|
||||
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
|
||||
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.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
|
||||
BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
|
||||
|
@ -583,7 +590,7 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
Decorator (RepeatUntilFailed) {
|
||||
Decorator(Inverter) {
|
||||
Composite(Sequence) {
|
||||
BTC.Run("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
//BTC.GetKeyDown("Return")
|
||||
|
||||
Composite(Race) {
|
||||
|
@ -601,7 +608,7 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
BTC.CompareBool("RisottoIsSnapped", false)
|
||||
|
||||
// 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.SpeechOutputEnded()
|
||||
|
|
|
@ -31,7 +31,8 @@ public class NamedStudioEventEmitter : ComponentHandler {
|
|||
|
||||
public override string ContentLabel() {
|
||||
UpdateComponent();
|
||||
string[] eventName = studioEventEmitter.Event.Split('/');
|
||||
#if UNITY_EDITOR
|
||||
string[] eventName = studioEventEmitter.EventReference.Path.Split('/');
|
||||
string sndName = eventName[eventName.Length - 1];
|
||||
if (sndName.Trim().Length == 0) {
|
||||
sndName = "undefined";
|
||||
|
@ -40,6 +41,9 @@ public class NamedStudioEventEmitter : ComponentHandler {
|
|||
// sndName += "_" + manualNamePost;
|
||||
// }
|
||||
return sndName;
|
||||
#else
|
||||
return objName;
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void UpdateComponent() {
|
||||
|
@ -48,6 +52,7 @@ public class NamedStudioEventEmitter : ComponentHandler {
|
|||
}
|
||||
|
||||
public StudioEventEmitter studioEventEmitter;
|
||||
public string objName = "FMODAudio";
|
||||
|
||||
public override string titleText {
|
||||
get {
|
||||
|
@ -91,4 +96,4 @@ public class NamedStudioEventEmitter : ComponentHandler {
|
|||
[Header("FMod Support disabled: Window->MyBT->PreCompiler Definitions")]
|
||||
public string dummy;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARM64
|
||||
- first:
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARM64
|
||||
- first:
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
|
|
|
@ -14,7 +14,7 @@ PluginImporter:
|
|||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
|
|
|
@ -2689,7 +2689,7 @@ GameObject:
|
|||
- component: {fileID: 8061268387521178252}
|
||||
- component: {fileID: 9007450541643059173}
|
||||
m_Layer: 0
|
||||
m_Name: NamedEventTrigger.HANDMENU.Option3Button_69596
|
||||
m_Name: NamedEventTrigger.HANDMENU.Option3Button_116282
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -2826,7 +2826,7 @@ MonoBehaviour:
|
|||
handlers:
|
||||
- {fileID: 9007450541643059173}
|
||||
roomId: HANDMENU
|
||||
uniqueId: 69596
|
||||
uniqueId: 116282
|
||||
--- !u!114 &9007450541643059173
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1 +1 @@
|
|||
2024-11-28T15:21:51.9731950Z
|
||||
2024-12-05T16:12:01.6739900Z
|
File diff suppressed because it is too large
Load Diff
|
@ -3,19 +3,51 @@ using System.Collections.Generic;
|
|||
using UnityEngine;
|
||||
using FMODUnity;
|
||||
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
public class OnCollideSound : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
EventReference soundRef;
|
||||
|
||||
[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)
|
||||
{
|
||||
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);
|
||||
Debug.Log(gameObject.name);
|
||||
}
|
||||
|
||||
_specialCase = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ TagManager:
|
|||
- Loeffel
|
||||
- Parmigiano
|
||||
- Topf
|
||||
- Messer
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
|
Loading…
Reference in New Issue