Implemented Zwiebeln braten sound
parent
2cbd840880
commit
5de8652d62
|
@ -5,11 +5,11 @@
|
||||||
|
|
||||||
//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")
|
||||||
//RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -791,10 +791,16 @@ Tree("32_Grotto_Kueche_alles_gefunden") {
|
||||||
// ...
|
// ...
|
||||||
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun")
|
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun")
|
||||||
|
|
||||||
|
// Herd anstellen
|
||||||
|
BTC.Run("NamedGrabEvent.STATIC.Herdschalter")
|
||||||
|
BTC.Show("GO/StudioEventEmitter.STATIC.Herdplatteanstelle")
|
||||||
|
|
||||||
// Zwiebeln in Topf geben
|
// Zwiebeln in Topf geben
|
||||||
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln")
|
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln")
|
||||||
BTC.Run("Collider.INTERACTABLES.Topf")
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
||||||
BTC.Start("StudioEventEmitter.STATIC.Herdplatte")
|
//BTC.StartSound("StudioEventEmitter.INTERACTABLES.ZwiebelninTopf")
|
||||||
|
BTC.Show("GO/StudioEventEmitter.INTERACTABLES.ZwiebelninTopf")
|
||||||
|
|
||||||
BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun")
|
BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun")
|
||||||
|
|
||||||
// Frage beantworten
|
// Frage beantworten
|
||||||
|
|
|
@ -278,25 +278,25 @@ public class BTC : MonoBehaviour {
|
||||||
}
|
}
|
||||||
|
|
||||||
[Task]
|
[Task]
|
||||||
public void Start(string objectName)
|
public void StartSound(string objectName)
|
||||||
{
|
{
|
||||||
List<ComponentHandler> handlers = GetHandlers(objectName);
|
List<ComponentHandler> handlers = GetHandlers(objectName);
|
||||||
handlers.ForEach(handler => handler.Start(Task.getState));
|
handlers.ForEach(handler => handler.StartSound(Task.getState));
|
||||||
if (handlers.Count == 0)
|
if (handlers.Count == 0)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"BTC.Start: no components under the name '{objectName}'");
|
Debug.LogWarning($"BTC.StartSound: no components under the name '{objectName}'");
|
||||||
Task.SetSucceeded();
|
Task.SetSucceeded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Task]
|
[Task]
|
||||||
public void Stop(string objectName)
|
public void StopSound(string objectName)
|
||||||
{
|
{
|
||||||
List<ComponentHandler> handlers = GetHandlers(objectName);
|
List<ComponentHandler> handlers = GetHandlers(objectName);
|
||||||
handlers.ForEach(handler => handler.Stop(Task.getState));
|
handlers.ForEach(handler => handler.StopSound(Task.getState));
|
||||||
if (handlers.Count == 0)
|
if (handlers.Count == 0)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"BTC.Stop: no components under the name '{objectName}'");
|
Debug.LogWarning($"BTC.StopSound: no components under the name '{objectName}'");
|
||||||
Task.SetSucceeded();
|
Task.SetSucceeded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,19 +220,19 @@ public class ComponentHandler : MonoBehaviour {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Start(MyBT.NodeState nodeState)
|
public virtual void StartSound(MyBT.NodeState nodeState)
|
||||||
{
|
{
|
||||||
if (Task.isDebugging)
|
if (Task.isDebugging)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"ComponentHandler.Start: not implemented for {this.GetType()}");
|
Debug.LogWarning($"ComponentHandler.StartSound: not implemented for {this.GetType()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Stop(MyBT.NodeState nodeState)
|
public virtual void StopSound(MyBT.NodeState nodeState)
|
||||||
{
|
{
|
||||||
if (Task.isDebugging)
|
if (Task.isDebugging)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"ComponentHandler.Stop: not implemented for {this.GetType()}");
|
Debug.LogWarning($"ComponentHandler.StopSound: not implemented for {this.GetType()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,14 +86,22 @@ public class NamedStudioEventEmitter : ComponentHandler {
|
||||||
|
|
||||||
// during runtime
|
// during runtime
|
||||||
if (nodeState == NodeState.Running) {
|
if (nodeState == NodeState.Running) {
|
||||||
|
bool isOneShot;
|
||||||
|
studioEventEmitter.EventDescription.isOneshot(out isOneShot);
|
||||||
|
/*if (!isOneShot)
|
||||||
|
{
|
||||||
|
Task.SetSucceeded();
|
||||||
|
return;
|
||||||
|
}*/
|
||||||
if (!studioEventEmitter.IsPlaying()) {
|
if (!studioEventEmitter.IsPlaying()) {
|
||||||
|
|
||||||
Task.SetSucceeded();
|
Task.SetSucceeded();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Start(MyBT.NodeState nodeState)
|
public override void StartSound(MyBT.NodeState nodeState)
|
||||||
{
|
{
|
||||||
if (nodeState == NodeState.Aborting)
|
if (nodeState == NodeState.Aborting)
|
||||||
{
|
{
|
||||||
|
@ -104,12 +112,13 @@ public class NamedStudioEventEmitter : ComponentHandler {
|
||||||
if (nodeState == NodeState.FirstRun)
|
if (nodeState == NodeState.FirstRun)
|
||||||
{
|
{
|
||||||
studioEventEmitter.Play();
|
studioEventEmitter.Play();
|
||||||
|
UnityEngine.Debug.Log($"NamedStudioEventEmitter: Event from {gameObject.name} start playing.");
|
||||||
Task.SetSucceeded();
|
Task.SetSucceeded();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Stop(MyBT.NodeState nodeState)
|
public override void StopSound(MyBT.NodeState nodeState)
|
||||||
{
|
{
|
||||||
if (nodeState == NodeState.Aborting)
|
if (nodeState == NodeState.Aborting)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2024-12-10T18:42:57.0313470Z
|
2024-12-16T19:11:12.2113660Z
|
File diff suppressed because it is too large
Load Diff
|
@ -140,6 +140,9 @@ PlayerSettings:
|
||||||
bundleVersion: 0.1
|
bundleVersion: 0.1
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: 11400000, guid: be340e3c48769439d8d18a5a2bccd498, type: 2}
|
- {fileID: 11400000, guid: be340e3c48769439d8d18a5a2bccd498, type: 2}
|
||||||
|
- {fileID: 11400000, guid: bfa1182bd221b4ca89619141f66f1260, type: 2}
|
||||||
|
- {fileID: -8196854396901781169, guid: 1a4c68ca72a83449f938d669337cb305, type: 2}
|
||||||
|
- {fileID: -64324148185763206, guid: a9a6963505ddf7f4d886008c6dc86122, type: 2}
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
wsaTransparentSwapchain: 0
|
wsaTransparentSwapchain: 0
|
||||||
m_HolographicPauseOnTrackingLoss: 1
|
m_HolographicPauseOnTrackingLoss: 1
|
||||||
|
|
Loading…
Reference in New Issue