Add NamedSocketEvent, changed Grotto scene and BT
parent
8412807f4f
commit
87f398cac3
|
@ -1,6 +1,6 @@
|
|||
Tree("Root") {
|
||||
Composite(Sequence) {
|
||||
RunTree("32_Grotto_Kueche_Intro")
|
||||
// RunTree("32_Grotto_Kueche_Intro")
|
||||
RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
|
||||
RunTree("32_Grotto_Kueche_alles_gefunden")
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ Tree("32_Grotto_Kueche_Intro") {
|
|||
//BTC.GetKeyDown("Return")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
||||
|
@ -63,47 +63,68 @@ Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|||
BTC.Run("AudioSource.AUDIO.Kueche2FZwiebelnsc")
|
||||
|
||||
// Zutaten leuchten
|
||||
// ...
|
||||
Composite(Marathon) {
|
||||
BTC.Show("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
|
||||
BTC.Show("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
|
||||
BTC.Show("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
BTC.Show("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
|
||||
BTC.Show("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
|
||||
BTC.Show("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
|
||||
}
|
||||
|
||||
|
||||
// Zutaten auf die Arbeitsflaeche legen mithilfe Sockets
|
||||
Composite(Marathon) {
|
||||
Composite(Sequence) {
|
||||
BTC.Show("GO/NamedGrabEvent.SOCKETS.RisottoSocket")
|
||||
BTC.Run("NamedGrabEvent.INTERACTABLES.Risotto")
|
||||
BTC.Run("GO/NamedGrabEvent.SOCKETS.RisottoSocket")
|
||||
BTC.Hide("GO/NamedGrabEvent.SOCKETS.RisottoSocket")
|
||||
BTC.Show("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
BTC.Hide("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
|
||||
}
|
||||
Composite(Sequence) {
|
||||
BTC.Show("GO/NamedGrabEvent.SOCKETS.SalzSocket")
|
||||
BTC.Run("NamedGrabEvent.INTERACTABLES.Salz")
|
||||
BTC.Run("GO/NamedGrabEvent.SOCKETS.SalzSocket")
|
||||
BTC.Hide("GO/NamedGrabEvent.SOCKETS.SalzSocket")
|
||||
BTC.Show("GO/NamedSocketEvent.SOCKETS.SalzSocket")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
|
||||
BTC.Hide("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.SalzSocket")
|
||||
}
|
||||
Composite(Sequence) {
|
||||
BTC.Show("GO/NamedGrabEvent.SOCKETS.PfefferSocket")
|
||||
BTC.Run("NamedGrabEvent.INTERACTABLES.Pfeffer")
|
||||
BTC.Run("GO/NamedGrabEvent.SOCKETS.PfefferSocket")
|
||||
BTC.Hide("GO/NamedGrabEvent.SOCKETS.PfefferSocket")
|
||||
BTC.Show("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
|
||||
BTC.Hide("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
|
||||
}
|
||||
Composite(Sequence) {
|
||||
BTC.Show("GO/NamedGrabEvent.SOCKETS.WeissweinSocket")
|
||||
BTC.Show("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
|
||||
BTC.Run("GO/NamedGrabEvent.SOCKETS.WeissweinSocket")
|
||||
BTC.Hide("GO/NamedGrabEvent.SOCKETS.WeissweinSocket")
|
||||
BTC.Hide("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
|
||||
}
|
||||
Composite(Sequence) {
|
||||
BTC.Show("GO/NamedGrabEvent.SOCKETS.BouillonSocket")
|
||||
BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
|
||||
BTC.Run("GO/NamedGrabEvent.SOCKETS.BouillonSocket")
|
||||
BTC.Hide("GO/NamedGrabEvent.SOCKETS.BouillonSocket")
|
||||
BTC.Hide("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
|
||||
}
|
||||
Composite(Sequence) {
|
||||
BTC.Show("GO/NamedGrabEvent.SOCKETS.OlivenoelSocket")
|
||||
BTC.Run("NamedGrabEvent.INTERACTABLES.Olivenoel")
|
||||
BTC.Run("GO/NamedGrabEvent.SOCKETS.OlivenoelSocket")
|
||||
BTC.Hide("GO/NamedGrabEvent.SOCKETS.OlivenoelSocket")
|
||||
BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
|
||||
BTC.Hide("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
|
||||
BTC.Run("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
|
||||
}
|
||||
}
|
||||
|
||||
BTC.Wait(1)
|
||||
|
||||
Composite(Marathon) {
|
||||
BTC.Hide("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
|
||||
BTC.Hide("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
|
||||
BTC.Hide("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
|
||||
BTC.Hide("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
|
||||
BTC.Hide("GO/NamedSocketEvent.SOCKETS.SalzSocket")
|
||||
BTC.Hide("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
|
||||
}
|
||||
|
||||
|
||||
// Keine Reaction
|
||||
//BTC.Wait(10)
|
||||
//BTC.Run("AudioSource.AUDIO.Kueche1FkeineReakt")
|
||||
|
@ -218,7 +239,7 @@ Tree("32_Grotto_Kueche_Zusammen_Kochen") {
|
|||
BTC.Run("AudioSource.AUDIO.Kueche1FZusammenKo")
|
||||
|
||||
// Risotto in Topf geben
|
||||
BTC.Run("NamedGrabEvent.INTERACTABLES.Risotto")
|
||||
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
||||
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Risotto")
|
||||
BTC.Run("Collider.INTERACTABLES.Topf")
|
||||
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using MyBT;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
[CustomEditor(typeof(NamedSocketEvent))]
|
||||
public class NamedSocketEventInspector : ComponentHandlerInspector
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
public class NamedSocketEvent : ComponentHandler
|
||||
{
|
||||
public override string TypeLabel()
|
||||
{
|
||||
return "NamedSocketEvent";
|
||||
}
|
||||
|
||||
public override string ContentLabel()
|
||||
{
|
||||
UpdateComponent();
|
||||
return objName;
|
||||
}
|
||||
|
||||
public override void UpdateComponent()
|
||||
{
|
||||
base.UpdateComponent();
|
||||
|
||||
if (GetComponent<XRSocketInteractor>())
|
||||
{
|
||||
GetComponent<XRSocketInteractor>().selectEntered.AddListener(SelectEnterEventHandler);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"NamedSocketEvent '{gameObject.name}' could not attach socket select event (missing XR Socket Interactor?)");
|
||||
}
|
||||
}
|
||||
|
||||
public string objName = "SocketObjXY";
|
||||
private bool triggered = false;
|
||||
|
||||
public void SelectEnterEventHandler(SelectEnterEventArgs args)
|
||||
{
|
||||
triggered = true;
|
||||
}
|
||||
|
||||
public override string titleText
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Run: Will Succeed on Select Enter Event";
|
||||
}
|
||||
}
|
||||
|
||||
public override string[][] helpText
|
||||
{
|
||||
get
|
||||
{
|
||||
return new string[][] {
|
||||
new string[] {"Run", "Return Success on Select Enter Event", $"BTC.Run(\"{roomId}\", \"{gameObject.name}\")"},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public override void Run(MyBT.NodeState nodeState)
|
||||
{
|
||||
if (nodeState == NodeState.FirstRun)
|
||||
{
|
||||
// reset event trigger at start
|
||||
triggered = false;
|
||||
}
|
||||
|
||||
if (nodeState == NodeState.Aborting)
|
||||
{
|
||||
triggered = false;
|
||||
}
|
||||
|
||||
if (triggered)
|
||||
{
|
||||
Task.SetSucceeded();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b7f727dbf43804514ad0452029a8e71e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1 +1 @@
|
|||
2024-08-09T09:54:25.0522010Z
|
||||
2024-08-12T12:08:31.2245540Z
|
File diff suppressed because it is too large
Load Diff
|
@ -5,12 +5,12 @@ EditorBuildSettings:
|
|||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Test-Scene.unity
|
||||
guid: 5739d873cf7d24221bea4b568b59f9c1
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/3.2-Grotto.unity
|
||||
guid: 51bd2edc532024f96a432eaf867d3a47
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Test-Scene.unity
|
||||
guid: 5739d873cf7d24221bea4b568b59f9c1
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/1.0-SBB.unity
|
||||
guid: 6a1144d40bbf04513a9929856271d4e7
|
||||
|
|
|
@ -140,6 +140,9 @@ PlayerSettings:
|
|||
bundleVersion: 0.1
|
||||
preloadedAssets:
|
||||
- {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
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
|
|
Loading…
Reference in New Issue